This question already has an answer here:
- AngularJS ngClass conditional 7 answers
I try to build a User bar like in Facebook "New Friend Requests" ore "New Pms"
This is now my HTML Template Code:
<li class="icon-element pms">
<div class="icon" ng-include="iconPm"></div>
<span class="counter"></span>
</li>
In the span is this can be 0. If it is 0, then i want to set a class in the li namend "is-zero"
I found some in other topics like:
<li ng-if="account.newPms == '0'></li>
but how i can set the class in the li if it is 0?
best regards!
Aucun commentaire:
Enregistrer un commentaire