title: Detect if checkbox is checked or unchecked in Angular.js ng-change event
body: <p>I want to detect if a checkbox has been checked or unchecked when a click is happening on the checkbox. </p>
  
  <p>This is what I have: </p>
  
  <pre><code>&lt;input type="checkbox" ng-model="answers[item.questID]" ng-change="stateChanged()" /&gt;
  </code></pre>
  
  <p>And then in the controller I have:</p>
  
  <pre><code>$scope.stateChanged = function () {
      alert('test');
  }
  </code></pre>
  
  <p>I'm able to fire the alert when I do check/uncheck but how can I detect the state of the checkbox? I did research a bit to find a similar issue but I wasn't able to get what I need. </p>