conditional classname angular code example
Example 1: conditional classes angular
<div
[className]="isActive ? 'active' : 'inactive'">
</div>
Example 2: Angular 8 ngClass If
[ngClass]="{'my-class': step=='step1', 'my-class2':step=='step2' }"
<div
[className]="isActive ? 'active' : 'inactive'">
</div>
[ngClass]="{'my-class': step=='step1', 'my-class2':step=='step2' }"