I’m also using tabs:
<ion-tabs #tabs selectedIndex="2" (ionChange)="onIonChanged($event)">
<ion-tab [root]="tab0Root" tabUrlPath="activity-tab" tabIcon="fa-fal-list"></ion-tab>
<ion-tab [root]="tab1Root" tabUrlPath="location-tab" tabIcon="fa-fal-map-marker"></ion-tab>
<ion-tab [root]="tab2Root" tabUrlPath="search-tab" tabIcon="fa-fal-street-view"></ion-tab>
<ion-tab [root]="tab3Root" tabUrlPath="person-tab" tabIcon="fa-fal-user"></ion-tab>
<ion-tab [root]="tab4Root" tabUrlPath="notifications-tab" tabIcon="fa-fal-bell"></ion-tab>
</ion-tabs>
So I followed this advice: URL navigation redirects to root page when using lazy loaded tabs template · Issue #12680 · ionic-team/ionic-framework · GitHub
tabs.page.ts:
@IonicPage({
name: 'TabsPage',
segment: 'sbat' // tabs
})
search.page.ts:
@IonicPage({
name: 'SearchPage',
segment: 'hcraes' // search
})
verified.venues.page.ts:
@IonicPage({
name: 'VerifiedVenuesPage',
segment: 'verified-venues',
defaultHistory: ['SearchPage']
})
So I can open a page directly, like: http://localhost:8100/#/sbat/search-tab/verified-venues