mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
docs($rootScope): rename ttl to digestTtl + docs
This commit is contained in:
parent
6a98c52c84
commit
e0ace15cd3
2 changed files with 26 additions and 2 deletions
|
|
@ -25,6 +25,30 @@
|
|||
* are expensive to construct.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc object
|
||||
* @name angular.module.ng.$rootScopeProvider
|
||||
* @description
|
||||
*
|
||||
* Provider for the $rootScope service.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name angular.module.ng.$rootScopeProvider#digestTtl
|
||||
* @methodOf angular.module.ng.$rootScopeProvider
|
||||
* @description
|
||||
*
|
||||
* Sets the number of digest iteration the scope should attempt to execute before giving up and
|
||||
* assuming that the model is unstable.
|
||||
*
|
||||
* The current default is 10 iterations.
|
||||
*
|
||||
* @param {number} limit The number of digest iterations.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc object
|
||||
* @name angular.module.ng.$rootScope
|
||||
|
|
@ -37,7 +61,7 @@
|
|||
function $RootScopeProvider(){
|
||||
var TTL = 10;
|
||||
|
||||
this.ttl = function(value) {
|
||||
this.digestTtl = function(value) {
|
||||
if (arguments.length) {
|
||||
TTL = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ describe('Scope', function() {
|
|||
|
||||
it('should prevent infinite recursion and print watcher expression',function() {
|
||||
module(function($rootScopeProvider) {
|
||||
$rootScopeProvider.ttl(100);
|
||||
$rootScopeProvider.digestTtl(100);
|
||||
});
|
||||
inject(function($rootScope) {
|
||||
$rootScope.$watch('a', function() {$rootScope.b++;});
|
||||
|
|
|
|||
Loading…
Reference in a new issue