How to create a function to go to another tab in IONIC?

Asked

Viewed 800 times

1

Is there a function that allows me to go to a particular application tab in Ionic? Assuming I have that tab organization:

<ion-tabs class="tabs-icon-top tabs-positive">

        <ion-tab title="Home" icon="ion-home" href="#/tab/home">
          <ion-nav-view name="home-tab"></ion-nav-view>
        </ion-tab>

        <ion-tab title="About" icon="ion-ios-information" href="#/tab/about">
          <ion-nav-view name="about-tab"></ion-nav-view>
        </ion-tab>

        <ion-tab title="Contact" icon="ion-ios-world" ui-sref="tabs.contact">
          <ion-nav-view name="contact-tab"></ion-nav-view>
        </ion-tab>

1 answer

-1

In his html you use:

(click)="home()" ao invés de href

Inside the archive .TS

home (){
this.navCtrl.push(HomePage);

}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.