Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48986

How to select a tab with Ionic5?

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 48986

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>