Ng-class with ion-tab


#1

ng-class doesn’t work with ion-tab. I need to programatically set “tab-item-active”. I can set it withou ng-class but can’t unset it.


#2
<ion-tabs ng-class="{'tabs-item-hide': hideTabs}" class="tabs-icon-top tabs-color-active-positive">

I use ion-tabs and i have the same problem,and solve by add ‘’ around the class name,because the - is invalid for the key for the ng-class.


#3

Did you sort out how to programmatically set tab-item-active? I’m still having trouble with it:

See the Pen LpProY by Suny Lyons (@sunylyons) on CodePen.

In this example the idea is set “Home” to active styling when the user navigates to content using buttons 2 & 3 (hidden tabs).

The reason why this could be useful may not be entirely evident in this example but…there are some! Any ideas?