Reputation: 173
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....
Upvotes: 1
Views: 3299
Reputation: 296
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.
Upvotes: 5
Reputation: 1312
Also you can just add “tabsHideOnSubPages: true” to your app.module.ts config
IonicModule.forRoot(MyApp,{ tabsHideOnSubPages: true })
Upvotes: 1