jeudi 23 juin 2016

Set Class if json Array is 0 [duplicate]

This question already has an answer here:

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