This is not like that. You would need to use multi-line comment syntax like this:
<div ng-class="{'test':true,'test1':true, /* some comment */ 'test2':true}"></div>
But this causes an error:
Syntax error: token "*" is unexpected, waiting for [:] in column 29 of expression [{'test': true, 'test1': true, / * some comment * / 'test2': true}] starting with [* some comment * / 'test2': true}].
However, you can get around this by declaring your styles in your controller / directive:
$scope.styles = { 'test': true, 'test1': true, 'test2': true };
And including this, in your opinion:
<div ng-app="MyApp"> <div ng-controller="MyCtrl"> <div ng-class="styles"></div> </div> </div>
JsFiddle example
source share