Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

ngclass else

<p class="{{condition ? 'checked' : 'unchecked'}}">
<!-- or -->
<p [ngClass]="condition ? 'checked' : 'unchecked'">
<!--or -->
<p [ngClass]="[condition ? 'checked' : 'unchecked']">
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ngclass
ADD COMMENT
Topic
Name
9+8 =