Ionic 4: Tabs remember the last page when returning to the tab

Hey guys,

I’m experimenting with Ionic 4 routing and the tabs layout. Lets say I have a tab “list” where I display some items and when clicking on an item I go one page deeper in the same tab and display the “details” tab.

I achieve this with setting up another route inside the like this:

      { path: 'list', outlet: 'list', component: ListPage },
      { path: 'details', outlet: 'list', component: DetailsPage },

Then I can route between the routes: tabs/(list:list)/ and tabs/(list:details)/.

This works fine so far but there is one problem.

When I’m in the list tab on the details page, then go to another tab and then return to the list tab, I wan’t to have the details page still opened but because the tab itself routes to tabs/(list:list)/ it opens the list page. So I need to somehow remember the exact route for every tab I was on when going to another tab and then binding the route to the tab itself.
This works in Ionic 3 with the NavController but with the new Angular routing style it doesn’t work.

Is there any good solution to this?


I have the same problem. I’m about to resort to NavController.

I have the same problem too.


This is a known issue of Ionic-v4, and is something the Ionic team will be working on, but remember this is still in beta so issues like this should be expected.

I’m sure it’ll be fixed in a the few releases.