Wednesday, 18 September 2013

Angular $event undefined in Firefox

Angular $event undefined in Firefox

As said in the angular api docs, ng-mouseenter makes event object
available as $event.
HTML:
<div ng-mouseenter="enter('test', $event)">Enter mouse over here</div>
JS:
$scope.enter = function(data, $event) {
console.log($event.x);
};
Use this fiddle and notice that...
in chrome the log gives: 77 (or another number)
And firefox gives the log: undefined.
Am I using $event the wrong way or does $event not work in Firefox?

No comments:

Post a Comment