Hide Tabs in child page on ionic


#1

Guys, how can i hide the tabs on child page?

I see a lot of ways, like: hide-nav-bar=“true”… but work only on ionic 1… How can i do that on ionic3?

Thanks!!


#2

Hi @danielpt

code like below :


<ion-tabs hide-tabs selectedIndex="1" >

  <ion-tab [root]="tab1Root" tabTitle="Editor Picks" tabIcon="ios-star"></ion-tab>

</ion-tabs>

import {Editor} from '../editor/editor';
  tab1Root: any `= Editor;

in the child page

  tabBarElement: any;

constructor(){
       this.tabBarElement = document.querySelector('.tabbar.show-tabbar')

}
   ionViewWillEnter() {
       this.tabBarElement.style.display = 'none';
       console.log('ionViewDidLoad AlldetailPage');
   }
  ionViewWillLeave() {
    this.tabBarElement.style.display = 'flex';
  }

Thanks