Setting up an ng-class
in my app
My current setup looks like this:
$scope.myClass = 'class-A';
Performing a task here...
$scope.myClass ='class-B';
Performing another task here
$scope.myClass ='class-C';
html
<div ng-class="{myClass}"></div>
The above codes are functional. The issue arises when I try to add an additional one.
<div ng-class="{myClass, 'class-cool':openDialog}"></div>
Error message received:
Token ',' is unexpected, expecting [:] at column 15 of the expression
All classes work individually but not together. Seeking assistance on this matter. Thank you!