title: Angular: conditional class with *ngClass
body: <p>What is wrong with my Angular code? I am getting the following error:</p>
  <blockquote>
  <p>Cannot read property 'remove' of undefined at BrowserDomAdapter.removeClass</p>
  </blockquote>
  <pre class="lang-html prettyprint-override"><code>&lt;ol&gt;
    &lt;li *ngClass=&quot;{active: step==='step1'}&quot; (click)=&quot;step='step1'&quot;&gt;Step1&lt;/li&gt;
    &lt;li *ngClass=&quot;{active: step==='step2'}&quot; (click)=&quot;step='step2'&quot;&gt;Step2&lt;/li&gt;
    &lt;li *ngClass=&quot;{active: step==='step3'}&quot; (click)=&quot;step='step3'&quot;&gt;Step3&lt;/li&gt;
  &lt;/ol&gt;
  </code></pre>