How to navigate on Ionic tables

Asked

Viewed 335 times

0

Hello! I created the tabs in my html of Ionic and I want when I click open the target page, appear the tabs right but when clicking only changes the icons to active and do not arrow the page, my code so in home.html

<ion-footer>
 <ion-toolbar>
   <ion-tabs>
      <ion-tab [root]="homeRoot" tabTitle="Chat" tabIcon="information-
        circle"></ion-tab>      
      <ion-tab [root]="listroot" tabTitle="Chat" tabIcon="information-
        circle"></ion-tab>  
   </ion-tabs> 
 </ion-toolbar>
</ion-footer>

code on home.ts

 export class HomePage {

 homeRoot = ChatPage
 listroot = ListPage

 constructor(public navCtrl: NavController) {} }
  • Run a test, put your page assignment as a string. Ex: homeRoot = 'ChatPage';

1 answer

1


Put the name to the tab

<ion-tabs #myTabs>

@ViewChild('myTabs') tabRef: Tabs;

this.tabRef.select(1); //1 é o índice da tab

Browser other questions tagged

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