I'm trying to change the text in a title tag based on a tag
's direction
value:
<li ng-repeat="t in tags">
<div class="tag"
ng-class="{'green-up': t.direction == 'positive',
'red-down': t.direction == 'negative',
'' : t.direction == 'stagnant'}"
title="Percentage increase"
ng-if="">{{t.name}}</div>
</li>
The direction is either positive
, negative
or stagnant
, which should correspond to title="Percentage increase"
title="Percentage decrease"
or just title="Percentage"
What Angular syntax would be best used in this case?