I would like to use a scope variable and and set css dynamically within html.
<div ng-class="myClassScope, { 'dynamic-class': !ifIsNot }">
I would like to use a scope variable and and set css dynamically within html.
|
|||||||||
|
Is this what you want?
EDIT: If you want to use multiple ng-class directives, it won't work. See this fiddle In order to use two ng-class directives, you can nest the elements, or you can bind to the class attribute:
|
|||||||||||||
|
It your myClassScope is intended to always be applied, use ng-class this way:
|
|||
|