chore: name the event callback used by ngClick and friends

This maskes looking at stack traces easier.

Since we generate the callbacks for each event type at runtime and we can't
set function's name because it's read-only, we have to use a generic name.
This commit is contained in:
Igor Minar
2014-06-05 05:55:38 -07:00
committed by rodyhaddad
parent 8661a9e3d4
commit 3fa1606c43

View File

@@ -45,7 +45,7 @@ forEach(
return {
compile: function($element, attr) {
var fn = $parse(attr[directiveName]);
return function(scope, element, attr) {
return function ngEventHandler(scope, element) {
element.on(lowercase(name), function(event) {
scope.$apply(function() {
fn(scope, {$event:event});