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

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.

主站蜘蛛池模板: 青阳县| 崇阳县| 七台河市| 大渡口区| 白朗县| 凤山市| 芦山县| 涪陵区| 根河市| 赤城县| 资兴市| 同心县| 扎兰屯市| 宁乡县| 纳雍县| 望都县| 和龙市| 马关县| 磴口县| 额济纳旗| 本溪市| 巩义市| 津市市| 阜南县| 民县| 北碚区| 江都市| 营口市| 墨竹工卡县| 赤峰市| 广平县| 大荔县| 蓝山县| 襄垣县| 安康市| 紫金县| 丽水市| 朝阳县| 澜沧| 罗甸县| 黑龙江省|