title: How do you toggle an active state ng-class in an ng-repeat item using ng-click?
body: <pre><code>&lt;ul&gt;
    &lt;li data-ng-repeat="image in images" data-ng-click="toggle = !toggle" data-ng-init="toggle=false"&gt;
        &lt;img data-ng-class="{'active' : toggle}" src="" /&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>CSS for 'active' class is from bootstrap. <br><br>
  So toggling works, which is almost where I want it; I would like it similar to active states in navigation links, except in my example it's dealing with images so need to worry about url strings, etc.</p>
  
  <p>I tried emulating this example found here to no avail (I tried the same logic for images): <a href="https://stackoverflow.com/questions/19943217/ng-class-to-highlight-active-menu-item-based-on-ng-repeat-angularjs">ng-class to highlight active menu item based on ng-repeat. AngularJS</a></p>
  
  <p>If someone could point me in the right direction, I would greatly appreciate it. :D</p>