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

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.

主站蜘蛛池模板: 五常市| 苗栗县| 吉林市| 明星| 闽侯县| 姚安县| 盐池县| 苍山县| 高雄县| 鸡东县| 南充市| 连南| 南汇区| 永顺县| 伊宁市| 青冈县| 修武县| 嵩明县| 尼勒克县| 额尔古纳市| 襄垣县| 正蓝旗| 黎城县| 昂仁县| 陆良县| 古蔺县| 盐亭县| 中方县| 宿迁市| 林西县| 白银市| 宜兰县| 剑阁县| 科技| 永平县| 汝城县| 林芝县| 明光市| 巴里| 霍州市| 霍邱县|