Created
July 8, 2014 19:39
-
-
Save carlospliego/864569e6409e2bd13efe to your computer and use it in GitHub Desktop.
AngularJS Conditional Classes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ng-class="{selected: $index==selectedIndex}" | |
ng-class="{admin:'enabled', moderator:'disabled', '':'hidden'}[user.role]" | |
thank you: http://stackoverflow.com/a/8309832/1883201 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment