title: AngularJS getting $event from a directive
body: <p>Seems pretty simple, but I can't get $event to bubble up from my directive.  When <code>test</code> gets called from <code>cb-click</code>, <code>$event</code> is undefined, but outside of a directive (via html), it's the event object.</p>
  
  <p>If I use a linking function (not included in my fiddle), I can get <code>$event</code>, but I can't $parse/$eval it against the right scope.</p>
  
  <p><a href="http://jsfiddle.net/langdonx/KgcGY/">http://jsfiddle.net/langdonx/KgcGY/</a></p>
  
  <pre><code>&lt;div ng-app="app" ng-controller="x"&gt;
      &lt;!-- via directive --&gt;
      &lt;checkbox cb-model="y" cb-click="test($event, b)"&gt;&lt;/checkbox&gt;
      &lt;!-- via html --&gt;
      &lt;div&gt;&lt;input id="c2" type="checkbox" ng-model="x" ng-click="test($event, 'a')"&gt; &lt;label for="c2"&gt;{{x}}&lt;/label&gt;&lt;/div&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>-</p>
  
  <pre><code>var app = angular.module('app', []);
  
  app.directive('checkbox', function ($parse) {
      return {
          restrict: 'E',
          replace: true,
          scope: {
              cbModel: '=',
              cbClick: '&amp;'
          },
          template: '&lt;div&gt;&lt;input id="c1" type="checkbox" ng-model="cbModel" ng-click="cbClick($event, \'a\')"&gt; &lt;label for="c1"&gt;{{cbModel}}&lt;/label&gt;&lt;/div&gt;'
      };
  });
  
  app.controller('x', function x($scope) {
      $scope.x = true;
      $scope.y = true;
      $scope.test = function (ev, b) {
          console.log('test called, ev is', ev, 'b is', b);
          return 'xyz';
      }
  });
  </code></pre>