I have an ng-repeat li elements and I want to set a specific value for that li depending on whether a function returns true or false and I
With the release of angular 1.2, you can now use the more intuitive ternary operator inside ng-bind
<a ng-bind="object1.hidden ? 'Maximize' : 'Minimize'"></a>
or inside brackets
<a>{{ object1.hidden ? 'Maximize' : 'Minimize' }}</a>
You can do this
{{ object1.hidden && 'Minimize' || 'Maximize' }}
In angular 1.2 a real ternary operator will be added.