$compileProvider.onChangesTtl()

onChangesTtl(limit);

Sets the number of times $onChanges hooks can trigger new changes before giving up and assuming that the model is unstable.

The current default is 10 iterations.

In complex applications it's possible that dependencies between $onChanges hooks and bindings will result in several iterations of calls to these hooks. However if an application needs more than the default 10 iterations to stabilize then you should investigate what is causing the model to continuously change during the $onChanges hook execution.

Increasing the TTL could have performance implications, so you should not change it without proper justification.

Parameters

Param Type Details
limit number

The number of $onChanges hook iterations.

Returns

numberobject

the current limit (or this if called as a setter for chaining)

doc_AngularJS
2016-03-29 16:10:18
Comments
Leave a Comment

Please login to continue.