Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to add multiple classes and expressions to the ng-class attribute.
<span class="label" ng-class="{'possibleValue1' : 'class1', 'possibleValue2' : 'class2', 'possibleValue3' : 'class3'}[object.value]" ng-bind-html='object.value'></span>
@jens1101

This comment has been minimized.

Copy link

jens1101 commented Feb 16, 2017

Shouldn't ng-class-multiple.js actually be ng-class-multple.html?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.