docs($anchorScrollProvider): document disableAutoScrolling method

This commit is contained in:
samuel durand
2014-11-17 09:59:47 +00:00
committed by Peter Bacon Darwin
parent 7ff5ec254e
commit 38ff199a3c

View File

@@ -53,6 +53,19 @@ function $AnchorScrollProvider() {
var autoScrollingEnabled = true;
/**
* @ngdoc method
* @name $anchorScrollProvider#disableAutoScrolling
*
* @description
* By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to
* {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.<br />
* Use this method to disable automatic scrolling.
*
* If automatic scrolling is disabled, one must explicitly call
* {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the
* current hash.
*/
this.disableAutoScrolling = function() {
autoScrollingEnabled = false;
};