javascript - How to combine these 2 ng-class statements? -
<ul> <li ng-repeat="(k, v) in charttags track k" class="blue-tag"> <div class="tag" ng-class="{blue1: k == 0 , blue2: k == 1 , blue3: k == 2 }" ng-class="{'positive': v.direction == 'positive', 'negative': v.direction == 'negative', '' : v.direction == 'stagnant'}">{{v.term}}</div> </li> </ul>
currently first ng-class
overrides 2nd ng-class
have. how combine both of these, blue class of sort, direction type?
chain them did first one.
<div class="tag" ng-class="{blue1: k == 0 , blue2: k == 1 , blue3: k == 2, 'positive': v.direction == 'positive', 'negative': v.direction == 'negative', '' : v.direction == 'stagnant'}"> </div>
it won't stop evaluating can have multiple classes.
here post adding multiple classes ng-class
.
Comments
Post a Comment