Show / Hide tab buttons based on view

I have a need in my app to display different buttons in the tab bar, depending on the state of the application, like this:

  • Home - no buttons on tab bar
    • Listing view - no buttons on tab bar
    • Details view - Action1 or Action2 button in tab bar (depends on whether the user unlocks a freemium upgrade)

I’ve done some reading through the forums, and the docs for a solution. However from what I’ve read so far, I believe I can only set static tab buttons that appear on all views associated with those tabs.

Does anyone have any suggestions on how I should be doing this, I’d greatly appreciate it.

Thanks in advance!

1 Like

There is a style named ‘tabs-item-hide’ on ion-tabs, which is not well documented.
You may take advantage of ‘ng-class’ to toggle this style, by watching a global variable on $rootScope, and add some logic before state is changed to set value of the variable mentioned above.