title: How to add/remove a class to the parent element of a checkbox on change in Angular js
body: <p>I have a list with checkbox items in it, On selecting the checkbox I want to add a class to the parent li. How can I achieve this.</p>
  
  <p>I am new to Angular.</p>
  
  <pre><code>&lt;ul&gt;
   &lt;li&gt;&lt;input type="checkbox" name="fruits[]" value="1"&gt;Apple&lt;/li&gt;
   &lt;li class="active"&gt;&lt;input type="checkbox" name="fruits[]" value="2" checked&gt;Orange&lt;/li&gt;
   &lt;li&gt;&lt;input type="checkbox" name="fruits[]" value="3"&gt;Pear&lt;/li&gt;
  
  &lt;/ul&gt;
  </code></pre>
  
  <p>On selecting the checkbox I want to add the class active to the parent li</p>