角度:带有 *ngClass 的条件类
2022-08-29 22:09:03
我的 Angular 代码有什么问题?我收到以下错误:
无法在 BrowserDomAdapter.removeClass 上读取 undefined 的属性“remove”
<ol>
<li *ngClass="{active: step==='step1'}" (click)="step='step1'">Step1</li>
<li *ngClass="{active: step==='step2'}" (click)="step='step2'">Step2</li>
<li *ngClass="{active: step==='step3'}" (click)="step='step3'">Step3</li>
</ol>