| 1. |
What can you say about the digest phase in AngularJS? |
|
Answer» The digest cycle or digest phase is the most important cycle required for the data binding process. It does the TASK of comparing the OLD version of a model with its new version. Whenever a CHANGE in the scope model is found during the comparison, the model watches are fired and another digest phase is initiated until the scope model is stable. The digest cycle can be triggered manually by MAKING use of $apply() or can be triggered automatically. The digest cycle gets triggered automatically when we use the core directives of AngularJS. In case we have any EXTERNAL code changes, then that would require manual triggering of the digest cycle. The following diagram illustrates the process of the digest cycle clearly. |
|