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'}
While I totally agree with @SamuelMS about explicitly displaying your class names...
If you really want to use multiple ternary operators (or are simply curious) you can do so like this: