aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/anchorScroll.js
diff options
context:
space:
mode:
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;