1

I am new to ionic2, I want to remove tabs from specific page. I am using below code :

import { NavController, App } from 'ionic-angular';

constructor(public navCtrl: NavController, public app: App){

this.navCtrl.push(MainPage);
}

but whenever using above code all pages tabs are removed. I want to remove specific page only. Please help me....

Pavan Reddy
  • 173
  • 1
  • 3
  • 11

2 Answers2

5

You can hide tabs on sub pages of a tab by using the tabsHideOnSubPages attribute:

<ion-tabs>
  <ion-tab [root]="tab1Root" tabTitle="Contacts" tabIcon="contacts"></ion-tab>
  <ion-tab [root]="tab2Root" tabTitle="Profile" tabIcon="information-circle" tabsHideOnSubPages="true"></ion-tab>
</ion-tabs>

This will not show tabs for sub pages within this tab.

Pavel Chuchuva
  • 22,633
  • 10
  • 99
  • 115
Paul Halliday
  • 276
  • 1
  • 3
1

Also you can just add “tabsHideOnSubPages: true” to your app.module.ts config

IonicModule.forRoot(MyApp,{ tabsHideOnSubPages: true })
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Vijay Chauhan
  • 1,282
  • 19
  • 18