Change ion-nav-bar attribute doesn't apply


#1

Hi,

I try to change the css class on ion-nav-bar (ion-nav-bar is in my ion-view) like this

<ion-nav-bar ng-class="nav-title-slide-ios7 bar-{{class}}">
        <ion-nav-buttons side="left">
            <button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
        </ion-nav-buttons>
</ion-nav-bar>

But it doesn"t work.
Can you help me to find where is my problem. It’s like css class was “binding” only once.

thanks


#2

Thats because ng-class thinks it gets plain angular variables (not in {{}} notation).

try:
ng-class="‘nav-title-slide-ios7 bar-{{class}}’"

or split static classes and dynamic classes.


#3

Thanks,
It solve my problem