Introduction:- in this article we will learn how to apply multiple class in angularJs.
Definition:- we can apply classes multiple way some of them in this way.
1. ng-class using array syntax:
Definition:- we can apply classes multiple way some of them in this way.
1. ng-class using array syntax:
ng-class="{
expression1:'class1',expressionData2:'class2'}[Status]"
2. Adds 'odd' or 'even' classes to divng-class="[{0:'even', 1:'odd'}[ $index % 2]]"
3. ternary operator notation: ng-class="expression1? 'class1 class2' : 'class3 class4'"
4. we have multiple expression to add multiple ng-class. ng-class="{class1: expressionData1, class2: expressionData2}"
ng-class="{class1 : expression1, class2 : expression2}">
Hello World!
No comments:
Post a Comment