-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Closed
Labels
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
- Nightly
Current Behavior
I'm trying to destruct the navigate function from useIonRouter. But useIonRouter will throw a Typescript error
Uncaught TypeError: Cannot destructure property 'canGoBack' of '(0 , vue__WEBPACK_IMPORTED_MODULE_0__.inject)(...)' as it is undefined.
Expected Behavior
The function navigate can be desctructured from useIonRouter
Steps to Reproduce
Import useIonRouter from @ionic/vue
Destructure the function navigate from useIonRouter
Code Reproduction URL
No response
Ionic Info
Ionic:
Ionic CLI: 6.20.1
Ionic Framework : @ionic/vue 6.2.6
Capacitor:
Capacitor CLI : 4.3.0
@capacitor/android : 4.3.0
@capacitor/core : 4.3.0
@capacitor/ios : 4.4.0
Utility:
cordova-res : 0.15.4
native-run : 1.7.0
System:
NodeJS : v16.16.0 (C:\Program Files\nodejs\node.exe)
npm : 8.19.2
OS : Windows 10
Additional Information
No response