Hi all,
i have an ionic app that loads a “MenuPage” after Login. The “MenuPage” holds my with and sets the rootPage to my “TabPage”. Works good on all devices.
Now i want to hide the tabbar if the split-pane is shown (like on iPad or in Browser).
I am trying this with (ionChange) and firing an event to my “TabPage”. This works when i resize the app but not on inital startup. I think on initial startup the TabBar could not be found so it could not be hide? How can i solve my problem?
Her is some code:
menu.html
<ion-split-pane (ionChange)="onSplitPaneChange($event)">
...
</ion-split-pane>
menupage.ts
...
onSplitPaneChange(e) {
if (e._visible) {
this.events.publish('hide-tabbar', true);
} else {
this.events.publish('hide-tabbar', false);
}
}
...
tabspage.ts
...
events.subscribe('hide-tabbar', (hide) => {
console.log("hide-tabbar event");
if (hide) {
this.tabs.setTabbarHidden(true);
} else {
this.tabs.setTabbarHidden(false);
}
});
...