主题代表问题本身,是否有一种角度来检查当前摘要周期是否已经完成作为最后一个并且模型已经确定并且当前摘要周期本身不会触发另一个摘要周期
我知道摘要周期可以由用户代码触发,也可以由用户与浏览器交互的结果触发。 无论如何,角度知道何时停止消化越来越深。
The subject stands for the question itself, is there a way in angular to check whether current digest cycle has been completed as the last one and the model has been settled and current digest cycle itself will not trigger another digest cycle
I understand that the digest cycle can be triggered by user code or as a result of user's interaction with the browser. In any way angular knows when to stop digesting deeper and deeper.
最满意答案
您应该尝试使用scope.$$postDigest或$timeout(..., 0, false) 。
以下是两种方法的总结。
You should try scope.$$postDigest or $timeout(..., 0, false).
Here is a good summary on both methods.
更多推荐
发布评论