Back
How do you do a ternary with AngularJS (in the templates)?
It would be nice to use some in HTML attributes (classes and style) instead of creating and calling a function of the controller.
You can use the ternary operator as follows:-
Looking for Angularjs material from basics! Refer to this video on Angularjs provided by Intellipaat:
<li ng-class="$first ? 'firstRow' : 'nonFirstRow'">
31k questions
32.8k answers
501 comments
693 users