add class with condition in ngfor code example Example: ngif add class [ngClass]="{'my-class': step === 'step1'}"