[4.0.0-rc.3] Back button not working with tabs
See original GitHub issueBug Report
Ionic version: 4.0.0-rc.3
Current behavior: In the new RC, upon clicking the hardware back button in a tab, it does not go to the previous tab as before
Expected behavior: It should either go to home tab, or to previous tab
Steps to reproduce: See behavior.
Related code:
Other information:
Ionic info:
insert the output from ionic info here
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
[4.0.0-rc.3] Back button not working with tabs #17219 - GitHub
Bug Report Ionic version: 4.0.0-rc.3 Current behavior: In the new RC, upon clicking the hardware back button in a tab, it does not...
Read more >ionic 4 - android back button not working for tab-bar routes
I'm expecting to go back to previous navigated page/tab. It looks like the router is not considering routes inside tabs page. My app.routes...
Read more >Tab | React Native Elements
This is documentation for React Native Elements 4.0.0-rc.3, which is no longer actively maintained. For up-to-date documentation, see the latest version (4.0.
Read more >Back button not working after extension opens new URL
Hi all! I'm seeing an issue with the Back button when an extension opens new URLs. Here's the scenario: 1. User has a...
Read more >The Back button/action will not return to first page opened on a ...
When I navigate to the second webpage in that tab via a link, manual entry or bookmark, the Back button does not become...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
NavController in V4 is just a thin wrapper on top of Angular Router, it does not replace it. It is just useful when you want a fine control over the animations (transitions) and stack.
Stack, you can go forward and backward, pushing or popping pages from the DOM. How do you control it? Using the angular router.
BUT if you want fine control, NavController exposes additional APIs for you to control it.
Tabs is a good use case, take a iOS native app, imagine you navigate forward in a tab and now you switch to a different tab. The “navigation” performed in the first tab is still there when you go back, that’s what the “stack” does for you.
The stack is handled automatically by Ionic when using the Angular Router.
There is a confusion between v3 NavController and v4 NavController:
<ion-nav>
Source code is the best documentation: https://github.com/ionic-team/ionic/blob/master/angular/src/providers/nav-controller.ts#L183-L190
Thanks for the feedback, this helps a lot to understand what things are confusing and we can focus our efforts to improve the documentation of this parts of Ionic!
Going to close this issue, since github issues are not intended for support purposes.
I invited a member of the official Ionic team to this topic, he will tell you more information about it 😃