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/anchorScroll.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/ng/anchorScroll.js') diff --git a/src/ng/anchorScroll.js b/src/ng/anchorScroll.js index ecaa62e0..87867589 100644 --- a/src/ng/anchorScroll.js +++ b/src/ng/anchorScroll.js @@ -55,9 +55,10 @@ function $AnchorScrollProvider() { // does not scroll when user clicks on anchor link that is currently on // (no url change, no $locaiton.hash() change), browser native does scroll if (autoScrollingEnabled) { - $rootScope.$watch(function() {return $location.hash();}, function() { - $rootScope.$evalAsync(scroll); - }); + $rootScope.$watch(function autoScrollWatch() {return $location.hash();}, + function autoScrollWatchAction() { + $rootScope.$evalAsync(scroll); + }); } return scroll; -- cgit v1.2.3