docs($rootScope): rename ttl to digestTtl + docs

This commit is contained in:
Igor Minar 2012-03-05 14:52:34 -08:00
parent 6a98c52c84
commit e0ace15cd3
2 changed files with 26 additions and 2 deletions

View file

@ -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;
}

View file

@ -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++;});