AngularJS change detection

From Wiki @ Karl Jones dot com
Revision as of 13:54, 31 December 2016 by Karl Jones (Talk | contribs) (Created page with "In AngularJS, a '''change detection''' checks for changes in the data model so that it can re-render the DOM. Changes are caused by events, XHR, and times. Each componen...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In AngularJS, a change detection checks for changes in the data model so that it can re-render the DOM.

Changes are caused by events, XHR, and times.

Each component has its own change detector.

Use ChangeDetectionStrategy.OnPush along with immutable objects and/or observables.

To checka particular component, inject ChangeDetectorRef and call markForCheck.

See also