liveBook · Manning

Change-detection scheduler

As explained in Modern Angular

A change-detection scheduler is a mechanism that determines when Angular initiates change-detection work in response to application activity.

A change-detection scheduler determines when Angular starts change-detection work; it does not perform change detection itself. Historically, Zone.js supplied the scheduling signal, while Angular remained responsible for updating the UI. section 10.3.5

Angular v18 adds a zoneless scheduler alongside the conventional zone-based scheduler. It starts cycles only after framework-observable activity, making more explicit application updates possible without immediately breaking existing applications. section 10.3.5

The zoneless scheduler responds to signals such as:

  • ChangeDetectorRef.markForCheck, including notifications from the async pipe. section 10.3.5
  • ComponentRef.setInput when dynamically rendered components receive changed inputs. section 10.3.5
  • Template-used signal changes, event-listener callbacks, and newly attached dirty views. section 10.3.5

Trying zoneless scheduling

Enable the experimental provider in app.config.ts with provideExperimentalZonelessChangeDetection(). Treat this as a migration experiment rather than a production default: disabling Zone.js requires application code to conform to the supported update triggers. section 10.3.5

How Modern Angular covers it

How deep it goes
Explains scheduler responsibilities, enumerates triggering events, and stops short of production-ready zoneless migration guidance.
Examples
Uses markForCheck, setInput, signals, event listeners, dirty views, and an application configuration provider.
What it assumes
Assumes familiarity with Zone.js and Angular change detection before contrasting conventional and zoneless scheduling.
What you can do after
Operate/configure experimental zoneless scheduling and identify application updates that can trigger change detection without Zone.js.
How it connects
Connects change detection with Zone.js, signals, observables, async pipe, ChangeDetectorRef, and dynamic component inputs.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Modern Angular. The section links point to the parts of the book it draws on.