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

Zones

Zones are one of the new concepts that have been introduced in Angular. The concept of Zones was migrated from Dart to JavaScript.

The main reason why a lot of developers were attracted towards Angular initially was by its Auto-magic Data Binding among other things. This was achieved using scopes in Angular 1.x. In Angular 2, we are using Zone.js (https://github.com/angular/zone.js) to achieve the same.

Whenever there is a change in the data, Angular updates the appropriate stakeholders (variables, interfaces, providers, and so on) with new data. Angular can track all synchronous activities quite easily. But for change detection in asynchronous code, such as event handling, AJAX calls, or Timers, Angular 2 uses Zone.js.

To know more about zones, how they work, and change detection in Angular, check out Zones in Angular: http://blog.thoughtram.io/angular/2016/02/01/zones-in-angular-2.html and Angular change detection explained: http://blog.thoughtram.io/angular/2016/02/22/angular-2-change-detection-explained.html.

主站蜘蛛池模板: 手游| 泗阳县| 武胜县| 手机| 宜阳县| 新晃| 金平| 白河县| 福安市| 秀山| 本溪| 邻水| 麦盖提县| 偏关县| 周至县| 望奎县| 阆中市| 佳木斯市| 宾川县| 莲花县| 紫阳县| 信丰县| 达孜县| 黎平县| 黄冈市| 太和县| 土默特左旗| 鄂伦春自治旗| 绥德县| 南陵县| 株洲市| 东安县| 宜昌市| 泾川县| 民丰县| 深州市| 和硕县| 托克逊县| 宜川县| 禹州市| 宜兰县|