Reputation: 185
I have on my ionicbootstrap config:
{
mode: 'md',
tabsHideOnSubPages: true
}
On my settings, but on some sub-pages the tabs are showing. This seems a random behaviour. Is this the right way of doing this?
ionic : [email protected]
Thanks Artur
#EDIT:
I'm using this fix to make the tabs go away:
ionViewWillEnter() {
let tabs = document.querySelectorAll('.show-tabbar');
if (tabs !== null) {
Object.keys(tabs).map((key) => {
tabs[key].style.transform = 'translateY(56px)';
});
} // end if
}
ionViewDidLeave() {
let tabs = document.querySelectorAll('.show-tabbar');
if (tabs !== null) {
Object.keys(tabs).map((key) => {
tabs[key].style.transform = 'translateY(0)';
});
} // end if
}
But have to be a bad way. Any simple way of doing this?
Upvotes: 3
Views: 2349
Reputation: 3780
2017 Answer
Based on the Ionic docs, you just simply need to add tabsHideOnSubPages: true
to your app Ionic config like so:
app.module.ts
imports: [
BrowserModule,
IonicModule.forRoot(AppComponent, {
tabsHideOnSubPages: true
})
]
Upvotes: 7