question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: NavController.pop() doesn't work when leave Tabs layout.

See original GitHub issue

Bug 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

  1. Start on: http://localhost:4200/tabs/tab1/item1
  2. Click “Go to Item 2 Page”
  3. Click “Go to Global Page”
  4. Click “Go to Page 2 Programmatically”
  5. Click “Go to Page 1 Programmatically”
  6. Observe: Tab does not pop to the previous view
  7. Click ion-back-button (< Item 2 Page)
  8. 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:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
EinfachHanscommented, Aug 31, 2022

Dev build works fine for us! 😊

1reaction
sean-perkinscommented, Aug 30, 2022

Updated dev-build available for testing:

npm install @ionic/angular@6.2.5-dev.11661886076.141059a8
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found