Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 38ff199

Browse files
samuel durandpetebacondarwin
samuel durand
authored andcommitted
docs($anchorScrollProvider): document disableAutoScrolling method
1 parent 7ff5ec2 commit 38ff199

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/ng/anchorScroll.js

+13
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,19 @@ function $AnchorScrollProvider() {
5353

5454
var autoScrollingEnabled = true;
5555

56+
/**
57+
* @ngdoc method
58+
* @name $anchorScrollProvider#disableAutoScrolling
59+
*
60+
* @description
61+
* By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to
62+
* {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.<br />
63+
* Use this method to disable automatic scrolling.
64+
*
65+
* If automatic scrolling is disabled, one must explicitly call
66+
* {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the
67+
* current hash.
68+
*/
5669
this.disableAutoScrolling = function() {
5770
autoScrollingEnabled = false;
5871
};

0 commit comments

Comments
 (0)