add class depending on condition angular code example Example: Angular 8 ngClass If [class.my-class]="step=='step1'"