Tried looking for an answer to this with no success.
Is there anyway to have the value of a property be the class name when using ng-class in angularJS?
An example of what I mean:
var things = [
{
a: "abc",
aTrue: true
}
];
Then in Angular (using ng-repeat in this instance)
<div ng-repeat="thing in things" ng-class="{thing.a: !!thing.aTrue}></div>
I'm looking for the class name to be "abc" - but this gives me a class name of "thing.a". Is this even possible, where am I going wrong?
Thanks in advance, your help is appreciated.