What is the best way to put more than 1 ternary conditional class in angular's ngClass directive, where the values are the class-names?
I've tried a few variations on this, but i always get a compiling error:
ng-class="$index > 2 ? 'l3 m4 s12 medium' : 'l4 m6 s12 medium', true ? 'red':'blue'
ng-class="{$index > 2 ? 'l3 m4 s12 medium' : 'l4 m6 s12 medium', true ? 'red':'blue'}
My preferred syntax for ng-class is the following, since it is explicit as to which classes you are adding.
Give that a try.