bug: NavController.pop() doesn't work when leave Tabs layout.
See original GitHub issueBug Report
Ionic version:
- 4.5.0
- v5.x
- v6.x
Current behavior:
When I call navCtrl.pop from a nested outlet which is not in a tab, it redirects back to the right tab which has some nav stack, but then navCtrl.pop doesn’t work. With ion-back-button it works fine.
Expected behavior:
NavContoller.pop() should be able to navigate to the correct page in nav stack as ion-back-button does.
Steps to reproduce:
https://github.com/sean-perkins/gh-18593-nav-pop
- Start on: http://localhost:4200/tabs/tab1/item1
- Click “Go to Item 2 Page”
- Click “Go to Global Page”
- Click “Go to Page 2 Programmatically”
- Click “Go to Page 1 Programmatically”
- Observe: Tab does not pop to the previous view
- Click
ion-back-button
(< Item 2 Page) - Observe: Tab pops to the previous view
Expected:
- Clicking “Go to Page 1 Programmatically” should pop to the previous view in the tab
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:9 (5 by maintainers)
Top Results From Across the Web
NavController's pop and back don't go back to previous page ...
I'm using Ionic 4 with Angular. I have this page that, only on certain conditions that I managed to reproduce, behaves weirdly when...
Read more >NavController - Ionic API Documentation
NavController is the base class for navigation controller components like Nav and Tab . You use navigation controllers to navigate to pages in...
Read more >Navigate to a destination - Android Developers
Navigating to a destination is done using a NavController , an object that manages app navigation within a NavHost .
Read more >UINavigationController | Apple Developer Documentation
If the top-level view controller doesn't have a custom left bar button item ... The navigation controller doesn't change its view hierarchy or...
Read more >Tab selection does not update [210687967] - Issue Tracker
This can be seen by calling navigate() to go to your SecondFragment - even though you haven't used the bottom nav button, the...
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 Free
Top 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
Dev build works fine for us! 😊
Updated dev-build available for testing: