Skip to content

Instantly share code, notes, and snippets.

@pierrejoubert73
Created October 12, 2016 10:38
Show Gist options
  • Save pierrejoubert73/e15c5d88fd881887998248bc2ad05833 to your computer and use it in GitHub Desktop.
Save pierrejoubert73/e15c5d88fd881887998248bc2ad05833 to your computer and use it in GitHub Desktop.
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
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