Quantcast
Viewing latest article 25
Browse Latest Browse All 26

Angular: conditional class with *ngClass

What is wrong with my Angular code? I am getting the following error:

Cannot read property 'remove' of undefined at BrowserDomAdapter.removeClass

<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>

Viewing latest article 25
Browse Latest Browse All 26

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>