From ca30fce28ca13284bfa1c926e810ed75cdcde499 Mon Sep 17 00:00:00 2001 From: Shyam Seshadri Date: Fri, 6 Jul 2012 15:23:40 +0530 Subject: fix(*): name all anonymous watch functions in Angular This will allow us to see function names in Batarang and debugger. Closes #1119 --- src/ng/directive/ngBind.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ng/directive/ngBind.js') diff --git a/src/ng/directive/ngBind.js b/src/ng/directive/ngBind.js index 70f25370..0c99f27d 100644 --- a/src/ng/directive/ngBind.js +++ b/src/ng/directive/ngBind.js @@ -49,7 +49,7 @@ */ var ngBindDirective = ngDirective(function(scope, element, attr) { element.addClass('ng-binding').data('$binding', attr.ngBind); - scope.$watch(attr.ngBind, function(value) { + scope.$watch(attr.ngBind, function ngBindWatchAction(value) { element.text(value == undefined ? '' : value); }); }); @@ -132,7 +132,7 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) { var ngBindHtmlUnsafeDirective = [function() { return function(scope, element, attr) { element.addClass('ng-binding').data('$binding', attr.ngBindHtmlUnsafe); - scope.$watch(attr.ngBindHtmlUnsafe, function(value) { + scope.$watch(attr.ngBindHtmlUnsafe, function ngBindHtmlUnsafeWatchAction(value) { element.html(value || ''); }); }; -- cgit v1.2.3