Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0ace15

Browse files
committed
docs($rootScope): rename ttl to digestTtl + docs
1 parent 6a98c52 commit e0ace15

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

src/service/scope.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,30 @@
2525
* are expensive to construct.
2626
*/
2727

28+
29+
/**
30+
* @ngdoc object
31+
* @name angular.module.ng.$rootScopeProvider
32+
* @description
33+
*
34+
* Provider for the $rootScope service.
35+
*/
36+
37+
/**
38+
* @ngdoc function
39+
* @name angular.module.ng.$rootScopeProvider#digestTtl
40+
* @methodOf angular.module.ng.$rootScopeProvider
41+
* @description
42+
*
43+
* Sets the number of digest iteration the scope should attempt to execute before giving up and
44+
* assuming that the model is unstable.
45+
*
46+
* The current default is 10 iterations.
47+
*
48+
* @param {number} limit The number of digest iterations.
49+
*/
50+
51+
2852
/**
2953
* @ngdoc object
3054
* @name angular.module.ng.$rootScope
@@ -37,7 +61,7 @@
3761
function $RootScopeProvider(){
3862
var TTL = 10;
3963

40-
this.ttl = function(value) {
64+
this.digestTtl = function(value) {
4165
if (arguments.length) {
4266
TTL = value;
4367
}

test/service/scopeSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ describe('Scope', function() {
191191

192192
it('should prevent infinite recursion and print watcher expression',function() {
193193
module(function($rootScopeProvider) {
194-
$rootScopeProvider.ttl(100);
194+
$rootScopeProvider.digestTtl(100);
195195
});
196196
inject(function($rootScope) {
197197
$rootScope.$watch('a', function() {$rootScope.b++;});

0 commit comments

Comments
 (0)