mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-28 11:56:03 +08:00
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:
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user