Angular 常用筆記
css class
- ```htmlmixed= [class.my_class] = "step === 'step1'"
2.
```htmlmixed=
[ngClass]="{'my_class': step === 'step1'}"
- and multiple option: ```htmlmixed= [ngClass]="{'my_class': step === 'step1', 'my_class2' : step === 'step2' }"
4.
```htmlmixed=
[ngClass]="{1 : 'my_class1', 2 : 'my_class2', 3 : 'my_class4'}[step]"
htmlmixed= [ngClass]="step == 'step1' ? 'my_class1' : 'my_class2'"