Currently, my tab code stacks all pages on top of each other for separate tabs. This results in showing previous stacked pages when I switch tabs, but I want all tabs to go back to the root page when changing tabs. Below is my existing code:
export class TabsPage {
tab1Root = HomePage;
tab2Root = SearchPage;
tab3Root = QueuesPage;
tab4Root = FavoritesPage;
tab5Root = SettingsPage;
constructor() {
}
}
<ion-tabs>
<ion-tab [root]="tab1Root" tabTitle="Home" tabIcon="home"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="Search" tabIcon="search"></ion-tab>
<ion-tab [root]="tab3Root" tabTitle="Queues" tabIcon="people"></ion-tab>
<ion-tab [root]="tab4Root" tabTitle="Favorites" tabIcon="star"></ion-tab>
<ion-tab [root]="tab5Root" tabTitle="Settings" tabIcon="cog"></ion-tab>
</ion-tabs>