title: AngularJS on-off switch
body: <p>I want a button in angularJs, that when I press it a function is called and when I press it again it does another function, like an ON-OFF switch. </p>
  
  <p>I have this:</p>
  
  <pre><code>&lt;a ng-click="addForm(data)" href=""&gt; &lt;div class="starOff" ng-class="{starOn: checkF(data)}"&gt;&lt;/div&gt; &lt;/a&gt;
  </code></pre>
  
  <p>I would to call another function when I click it once.</p>