官术网_书友最值得收藏!

In zone.js

This is exactly the case in Angular. This functionality is implemented with zones using zone.js.

At ng-conf, in 2014, Brian Ford gave a talk about zones. Brian presented zones as meta-monkey patching of browser APIs. The zone.js is a library developed by the Angular team, which implements zones in JavaScript. They represent an execution context, which allows us to intercept asynchronous browser calls. Basically, using zones, we are able to invoke a piece of logic just after the given XMLHttpRequest object completes or when we receive a new WebSocket event. Angular took advantage of zone.js by intercepting asynchronous browser events and invoking the digest loop just at the right time. This totally eliminates the need for explicit calls of the digest loop by the developer using Angular.

主站蜘蛛池模板: 镇安县| 泰安市| 改则县| 乌拉特中旗| 伊吾县| 阿巴嘎旗| 沽源县| 揭西县| 安溪县| 达州市| 绩溪县| 长沙县| 泊头市| 宝兴县| 阿瓦提县| 永川市| 韶山市| 资阳市| 蓬溪县| 东兰县| 靖安县| 罗源县| 怀仁县| 佛学| 无为县| 鄂托克前旗| 天柱县| 屏山县| 肥东县| 玉龙| 武川县| 黑山县| 永定县| 大宁县| 宿州市| 喀喇沁旗| 潜山县| 长子县| 林芝县| 余江县| 大化|