Hi,
which is the correct way to select programmatically a tab with Ionic5?
With previous versions of Ionic I used the code:
his.navCtrl.parent.select(tabIndex);
The tabs are defined in this way:
<ion-tabs>
<ion-tab-bar slot="bottom">
<ion-tab-button tab="dashboard">
<ion-icon name="triangle"></ion-icon>
<ion-label>Tab 1</ion-label>
</ion-tab-button>
<ion-tab-button tab="tab2">
<ion-icon name="ellipse"></ion-icon>
<ion-label>Tab 2</ion-label>
</ion-tab-button>
<ion-tab-button tab="tab3">
<ion-icon name="square"></ion-icon>
<ion-label>Tab 3</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
Thank you
Claudio B.
2 posts - 1 participant