ng-class is not working with multiple condition. Apply a class when both conditions are true
Here open and active class should apply when childActive is equal to header and list items is not empty
<li ng-class="{'open':list.items.length&&childActive==header,
'active':list.items.length&&childActive==header}"
ng-repeat="list in listEntities">
You have some other issue. The following, with multiple conditions, works:
<input ng-model="highlightEven" type="checkbox">
<div ng-repeat="item in ['a', 'b', 'c', 'd']"
ng-class="{even: $index % 2 === 0 && highlightEven}">{{item}}</div>
plunker
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With