title: AngularJS checkbox ng-change issue with $event.target
body: <p>I'm writing a simple AngularJS Controller that keeps track of the number of checkboxes checked.  Trying to avoid <code>$scope.$watch</code> and instead use <code>ng-change</code> to increment/decrement the total count.  </p>
  
  <p><strong>HTML</strong>:</p>
  
  <pre><code>&lt;form ng-controller="MainCtrl"&gt;
    &lt;table&gt;
      &lt;tr ng-repeat="item in data"&gt;
        &lt;td&gt;
        &lt;input type="checkbox" 
               value="{{item.id}}"
               ng-model="item.selected"
               ng-change="updateTotal($event)"&gt; &amp;nbsp; {{item.name}}
         &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;p&gt;
        Total checked: {{totalSelected}}
     &lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>Controller snippet</strong></p>
  
  <pre><code>$scope.updateTotal = function($event) {
  
      var checkbox = $event.target;
  
      if (checkbox.checked) {
        $scope.totalSelected++;
      }
      else {
        $scope.totalSelected--;
      } 
  }
  </code></pre>
  
  <p>I keep getting an error in the controller where I attempt to access <code>$event.target</code>: </p>
  
  <pre><code>TypeError: Cannot read property 'target' of undefined
  </code></pre>
  
  <p><strong>I created a Plunk for recreating: <a href="http://plnkr.co/edit/qPzETejmMHHZCQ2sV2Sk?p=info">http://plnkr.co/edit/qPzETejmMHHZCQ2sV2Sk?p=info</a></strong></p>
  
  <p>If anyone has any ideas or suggestions I would be very grateful. </p>
  
  <p>Thank you very much! </p>