Does anyone have any idea on how to implement a tab to show only under certain conditions?
For example, on first boot I would like to offer the user a “configuration” tab, but once configuration has been set, then I don’t want the tab to show anymore.
I’ve taken a stock tabs demo and added this to tabs.html which MOSTLY seems to work…
<* ion-tab title="Configuration" ng-if="settings.debugMode" icon-off="ion-ios-locked-outline" icon-on="ion-ios-unlocked-outline" href="#/view/config"> <*ion-nav-view name="view-config"><*/ion-nav-view> <*/ion-tab>
view-config is literally the previous tab-account tab, but the slider sets $rootScope.debugMode.
The expectation was that once the slider was slid then the tab would disappear.
That is exactly what happens the Configuration tab itself does disappear, but the content remains. Furthermore clicking any other tab (while slider is slid), results in nothing occuring.
There is nothing in the console.
Here’s the strangest thing. If I leave the window and come back a few minutes later, the dashboard view does in fact come back. But if I leave the window open and just watch it then nothing at all occurs.
Is this a bug? Or is there a better way to implement a conditional tab?