Ionic version:
[x] 4.x
Current behavior:
In a fresh ionic tabs project, when navigating forward in the app using routerLink.. once the same router is visited, for the second time, the back button will only the see the first occurrence in the navigation stack
Ex: tab1 > page1 > page2>page3>page2
now when the user click the hardware back button or the
Expected behavior:
back button should redirect user to the previous page which is page 3 in the previous example
Steps to reproduce:
Related code:
please see:
https://github.com/3adeling/navigation-issue
Other information:
Ionic info:
Hi there,
Thanks for the issue! Can you clarify the issue you are seeing?
I am seeing the following behavior:
Start on Tab 1, click button to Page 1
On Page 1, click button to Page 2
On Page 2, click button to Page 3
On Page 3, click button to Page 1
On Page 1, click back button
Redirected to Page 3
This appears to be the correct behavior, so I am interested in finding out how to reproduce the behavior you are reporting.
Thanks!
Are you using chrome back button?! please don't because it works fine.
The issue happens when you use both the ion-back-button (in browser and emulator) OR the device back button
Thanks for the follow up! I am able to reproduce this.
At first glance, it looks like the framework is trying to re-use the Page 1 component, including its navigation state.
We will look into this!
Most helpful comment
Thanks for the follow up! I am able to reproduce this.
At first glance, it looks like the framework is trying to re-use the
Page 1component, including its navigation state.We will look into this!