I came through the following example of ng-class="expression" in a book. http://plnkr.co/edit/fJGT5L9HZXvgAiAyXwlW?p=preview
ng-class="{error:isError,warning:isWarning}"
I get the controller logic, but my doubt is in the interpolation happening here.
What does the following scenarios mean (what is the evaluated value) and Why?
- ng-class="{error:true,warning:true}"
- ng-class="{error:true,warning:false}"
- ng-class="{error:false,warning:true}"
- ng-class="{error:false,warning:false}"
isErroris true the error class will be added. And no interpolation is happening here. You are passing JSON TOngClass