Allow to reset tab navigation stack on changing tabs.
See original GitHub issueFeature Request
Ionic version: [x] 4.x
Describe the Feature Request Allow to reset tab view stack on changing tabs.
Currently ion-tabs
navigation on changing the tab to one selected in the past having some sub views opened brings back the the most recent view for this tab.
Describe Preferred Solution in some cases restoring view stack may be confusing to the user - thus there should be an option to reset the tab to the root component.
also both ionTabsWillChange
and ionTabsDidChange
are called just one after another emitting same new tab while I’d expect to be able to know also the leaving tab (add leavingTab
property to the event?).
finally ionTabsWillChange
is fired only after the new tab is already visible while I’d expect to get ionTabsWillChange
before activating new tab and only ionTabsWillChange
after (this probably can be a separate bug)
Describe Alternatives
if there is a way to achieve this without side effect - would be good to add this information to the documentation.
Related Code
Additional Context
here is similar concern from another person on SO: https://stackoverflow.com/questions/53687233/how-to-reset-route-stack-after-routing-away-from-tab-using-angular-ionic-4#comment96962743_53687233
Issue Analytics
- State:
- Created 5 years ago
- Reactions:26
- Comments:12 (2 by maintainers)
Top GitHub Comments
Hi, with Ionic 5, my dirty solution is to directly use the router:
Hey @ciekawy!
I think I have a temporary solution that does not seem to have any side-effects (yet).