NavControl.pop always returns to first tab and not last used tab

#1

Hello there,

so I’m currently going mad over a problem I’m facing with my Ionic app. Let me explain:
(Disclaimer: I’m new to Ionic/Angular, so it might be some basic understanding of the routing/stack/push concept)
I’ve started with the regular tab-setup. I’ve added two custom (detail) pages with their own routes:

const routes: Routes = [
{...}
  {
    path: 'shoe',
    loadChildren: () => shoeSinglePageModule
  },
  {
    path: 'sale',
    loadChildren: () => saleSinglePageModule
  }
]

These detail pages don’t belong to any tabs, they can be accessed from all of my 4 tabs. Navigation with a forwards animation is no problem. I’ve tried every kind of navigation type: routerLink, navCtrl.navigateForwards etc.

And now comes the problem:
On these detail pages there is a Back-Button that should take you to the tab you’re coming from. But when using navCtrl.pop() to navigate back it always jumps back to the first tab.

I’ve managed to get around this by using navCtrl.back() - this works like I want to. But using the swipe-back method on the pages left edge, seems to use the .pop method under the hood, since the same problem appears - always jumping back to tab 1.

I feel like I’ve read every article on navigation and routing there is - I hope someone can help me out what I’m missing here.

// Update:
I’ve debugged why it’s always jumping to tab 1: A swipe back (.pop()-call) seems to trigger the route /tabs without any subTab specified. Which is declared to redirect to tab 1. But why does a swipe back not go back to the tab-url I’m coming from?