Answers for "ngclass if condition syntax angular"

1

ngclass else

<p class="{{condition ? 'checked' : 'unchecked'}}">
<!-- or -->
<p [ngClass]="condition ? 'checked' : 'unchecked'">
<!--or -->
<p [ngClass]="[condition ? 'checked' : 'unchecked']">
Posted by: Guest on August-18-2021
0

angular conditional class

<button [class.disable]="1==1">Apply disable class when condition is true</button>
Posted by: Guest on September-22-2021

Browse Popular Code Answers by Language