In Ionic 3 it was pretty easy to switch between different tab bars simply by assiging a new compontent to the root property: <nav [root]="rootPage"></nav>
in app.component.html.
In Ionic 4 I though it should be just as easy as defining two different routes:
{ path: '', loadChildren: './tabs/tabs.module#TabsPageModule' }, // default tabbar
{ path: 'tabs2', loadChildren: './tabs2/tabs2.module#Tabs2PageModule' }
Tabs2PageModule holds the same content as TabsPageModule (ionic starter tabs) but just a different module name and base tab route (prepending ‘2’).
But this is not woking. As soon as I try to activate the route tabs2 I’ll get an error: "Cannot match any routes. URL Segment: ‘tabs2/tab1’
Any idea whats going wrong and how to make it work?