ionic-framework
ionic-framework copied to clipboard
bug: router.go() not working as expected in ionic vue app
Prerequisites
- [X] I have read the Contributing Guidelines.
- [X] I agree to follow the Code of Conduct.
- [X] I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v7.x
Current Behavior
Actual behaviour: app view is in Page2 but url is Page1's.
Expected Behavior
Expected to be in Page1 for both url and view.
Steps to Reproduce
- Home page > Page 1 > Page2 > Page3 using ionRouter.push()
- Page3 > Page2 using ionRouter.back()
- Trigger history.go(-2) or router.go(-2) in Page2 4f603fb4-1c47-478f-9229-391b3fcef05c.webm
Code Reproduction URL
https://github.com/TaraWei-twobulls/Ionic-vue-app-router-issue-reproduction/tree/main
Ionic Info
Ionic:
Ionic CLI : 7.1.1 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/vue 7.1.2
Capacitor:
Capacitor CLI : 5.1.1 @capacitor/android : 5.1.1 @capacitor/core : 5.1.1 @capacitor/ios : 5.1.1
Additional Information
Seems ionic outlet view does not know where the current view is, and it always go back from the last view in stack though user has been back to the previous view
Thanks for the issue! This issue has been labeled as needs reproduction
. This label is added to issues that need a code reproduction.
Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.
For a guide on how to create a good reproduction, see our Contributing Guide.
Reproduction added. Please find the example codebase and the issue recording.
Did you push the complete code? I see myApp
is added as a submodule, but there's no information in there so I can't initialize it.
Sorry just noticed that and updated it.
Please run npm i
and ionice serve
to run locally.
Thank you for reporting the issue. I can confirm that the router.go()
is not navigating to the correct view. This issue has been categorized as a bug to prioritize in our backlog.