如何检查当前摘要是否已完成“干净”并且不会触发另一个摘要循环(How to check whether current digest has finished as “clean” and will

编程入门 行业动态 更新时间:2024-10-27 22:22:52
如何检查当前摘要是否已完成“干净”并且不会触发另一个摘要循环(How to check whether current digest has finished as “clean” and will not trigger another digest loop)

主题代表问题本身,是否有一种角度来检查当前摘要周期是否已经完成作为最后一个并且模型已经确定并且当前摘要周期本身不会触发另一个摘要周期

我知道摘要周期可以由用户代码触发,也可以由用户与浏览器交互的结果触发。 无论如何,角度知道何时停止消化越来越深。

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.

更多推荐

本文发布于:2023-07-22 00:59:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1215493.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:摘要   干净   current   check   digest

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!