aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/anchorScroll.js
diff options
context:
space:
mode:
authorShyam Seshadri2012-07-06 15:23:40 +0530
committerMisko Hevery2012-09-06 16:06:25 -0700
commitca30fce28ca13284bfa1c926e810ed75cdcde499 (patch)
treee7e2a41e740312981fab5f1226f8bd1d98b07e62 /src/ng/anchorScroll.js
parentb6e4a71166c7f00f4140fd7ea8f0cd81b4487a3f (diff)
downloadangular.js-ca30fce28ca13284bfa1c926e810ed75cdcde499.tar.bz2
fix(*): name all anonymous watch functions in Angular
This will allow us to see function names in Batarang and debugger. Closes #1119
Diffstat (limited to 'src/ng/anchorScroll.js')
-rw-r--r--src/ng/anchorScroll.js7
1 files changed, 4 insertions, 3 deletions
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;