title: Angular 2 - Change icon on click
body: <p>I have a materialize collapsible list in my angular2 application. What I want to do, is change the icon of the list item when someone clicks on it. So far I attached a click event onto the list. When I print this out to the console, I see the element reference. So I'm able to look down the child nodes and find the li element that has the active class attached to it. My thinking is that once I find the active element I can just change the child node's icon to the new one. This way I don't change all the icons. However, when I try to set the icon to the new icon, I get <code>TypeError: 0 is read-only</code>. Does anyone know how to do this via angular 2?</p>
  
  <p>Plunker<br>
  <a href="https://plnkr.co/edit/jQWf7uIRZIwr4fhyFT03?p=preview" rel="noreferrer">https://plnkr.co/edit/jQWf7uIRZIwr4fhyFT03?p=preview</a></p>
  
  <p>List</p>
  
  <pre><code>  &lt;ul class="collapsible" data-collapsible="accordion"&gt;
      &lt;li&gt;
        &lt;div class="collapsible-header"&gt;&lt;i class="material-icons"&gt;filter_drama&lt;/i&gt;First&lt;/div&gt;
        &lt;div class="collapsible-body"&gt;&lt;span&gt;Lorem ipsum dolor sit amet.&lt;/span&gt;&lt;/div&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;div class="collapsible-header"&gt;&lt;i class="material-icons"&gt;place&lt;/i&gt;Second&lt;/div&gt;
        &lt;div class="collapsible-body"&gt;&lt;span&gt;Lorem ipsum dolor sit amet.&lt;/span&gt;&lt;/div&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;div class="collapsible-header"&gt;&lt;i class="material-icons"&gt;whatshot&lt;/i&gt;Third&lt;/div&gt;
        &lt;div class="collapsible-body"&gt;&lt;span&gt;Lorem ipsum dolor sit amet.&lt;/span&gt;&lt;/div&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  </code></pre>
  
  <p>Desired Behavior:
  Basically I'm trying to make a drop down tree using materlize collapsible list. So you click on an item it changes its icon from a plus sign to a minus sign to simulate that you are expanding and contracting the item.  </p>
  
  <p><a href="https://ibb.co/meCkz5" rel="noreferrer">Picture Example  Link</a> </p>