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