mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-01-12 22:45:52 +08:00
docs($anchorScrollProvider): document disableAutoScrolling method
This commit is contained in:
committed by
Peter Bacon Darwin
parent
7ff5ec254e
commit
38ff199a3c
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user