Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to use ngclass in angular with condition

[ngClass]="{'myclass1': match === 'match1'}"
[ngClass]="{'myclass2': match === 'match1', 'myclass2' : match === 'match2' }"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ngclass #angular #condition
ADD COMMENT
Topic
Name
1+2 =