I have a span element displaying some value. If the value isn't 0, I want to apply some styleClass to the element:
<span styleClass="alert-error">{{value}}</span>
Otherwise, if the value is 0, I don't want to apply the styleClass. An empty styleClass attribute would be acceptable:
<span styleClass="">{{value}}</span>
How can I do this with AngularJS?
styleClassor you are trying to apply theclassattribute.styleClassactually comes from jsf, which I don't need anymore now that I'm going for AngularJS. So it's in fact theclassattribute I want to apply.