That's what I have:
ng-class="[{loading:loadingIsOn},{ color:true}]"
I have problem with color variable. It holds string value of defined color, but I can not pass it to HTML.
By the way,
ng-class="color"
works fine.
If loadingIsOn
is true, and color
is 'green', and you want class="loading, green"
, then all you need is
ng-class="[{loading:loadingIsOn}, color]"