Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 2.47 KB

README.md

File metadata and controls

51 lines (38 loc) · 2.47 KB

Angular change detection in-depth

Table of contents

Description

What is it?

Change detection is the process through which Angular checks to see whether your application state has changed, and if any DOM needs to be updated.

How does it work?

NgZone (Angular execution context) is used to detect changes automatically. It is done using zone.js which patches standard web APIs.

How does it trigger?

It can be triggered manually (using ChangeDetectorRef) or automatically through an asynchronous event (more details).

Optimization

At a high level, Angular walks your components from top to bottom, looking for changes.

Change detection is highly optimized and performant, but it can still cause slowdowns if the application performs it too frequently.

Optimization tips:

Demo

Details

Installation

yarn install --frozen-lockfile