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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -