How to use a dynamic value with ngClass
Better later than never.
<div ng-class="{'{{item.name}}' : item.condition}">
yes. '
and {{
for classname.
Simply using the variable should be sufficient:
<div ng-class="item.name" />
This is also documented in the official documentation.
I'm on angular 1.5.5 and none of these solutions worked for me.
It is possible to use the array and map syntax at once though it's only shown in the last example here
<div ng-class="[item.name, {'other-name' : item.condition}]">