angular ng class based on condition code example Example: Angular 8 ngClass If [ngClass]="{'my-class': step=='step1'}"