class ngIf code example
Example 1: conditional classes angular
<div
[className]="isActive ? 'active' : 'inactive'">
</div>
Example 2: add classon ng if
[ngClass]="{'my-class': step === 'step1'}"
<div
[className]="isActive ? 'active' : 'inactive'">
</div>
[ngClass]="{'my-class': step === 'step1'}"