From 2c6aa4c300073ef27fcce4c112646985d81a4fe4 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/input.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ng/directive/input.js') diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index cd2f0cfc..2fba7e92 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -995,7 +995,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$ // model -> value var ctrl = this; - $scope.$watch(ngModelGet, function(value) { + $scope.$watch(ngModelGet, function ngModelWatchAction(value) { // ignore change from view if (ctrl.$modelValue === value) return; @@ -1242,7 +1242,7 @@ var ngValueDirective = function() { }; } else { return function(scope, elm, attr) { - scope.$watch(attr.ngValue, function(value) { + scope.$watch(attr.ngValue, function valueWatchAction(value) { attr.$set('value', value, false); }); }; -- cgit v1.2.3