hi,
In my app, I am using event to navigate between the pages and to throw messages. I want that if the user is on stage x he will start the application on stage x. can I use the same event for it? or should I use NavPush?
Thanks!
onTab(ev: any) {
if (ev.index ==1 ) {
let alert = this.alertCtrl.create({
title: 'Next Stage',
message: 'Are you sure you are ready?',
buttons: [
{
text: 'No',
handler: () => {
this.superTabs.slideTo(this.selectedTab);
}
}, {
text: 'Yes',
handler: () => {
this.selectedTab = ev.index;
this.myStage=ev.index;
}
}
]
});
alert.present();
} else {
this.selectedTab = ev.index;
this.superTabs.clearBadge(this.pages[ev.index].id);
}
}
html
<super-tabs tabsPlacement="top" toolbarBackground="secondary" toolbarColor="light" indicatorColor="light"
(tabSelect)="onTab($event)">
<super-tab *ngFor="let page of pages" [root]="page?.pageName" [icon]="page?.icon" [id]="page?.id"></super-tab>
</super-tabs>```