liveBook · Manning

Zoneless change detection

As explained in Modern Angular

Zoneless is an Angular execution model that does not rely on zone-based asynchronous task tracking to schedule change detection.

Zoneless change detection separates Angular’s change-detection work from Zone.js scheduling. Angular still performs change detection, but a dedicated scheduler decides when cycles begin. section 10.3.5

Angular introduced a zoneless scheduler in v18 while initially running it alongside the conventional zone-based scheduler, allowing existing applications to upgrade without immediate breakage. section 10.3.5

The zoneless scheduler starts change-detection cycles when Angular observes signals or explicit framework activity, including:

  • ChangeDetectorRef.markForCheck, including the call made by 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 views that are already dirty. section 10.3.5

Enabling experimental zoneless support

Configure the application provider in app.config.ts: bootstrapApplication(AppComponent, { providers: [provideExperimentalZonelessChangeDetection()] }); section 10.3.5

Treat full zoneless operation as experimental: disabling Zone.js can expose bugs unless application updates consistently use signals, observables, or manual change-detection triggers. section 10.3.5

How Modern Angular covers it

How deep it goes
Explains scheduler separation, triggering events, and configuration, but stops short of production readiness guidance beyond experimental warnings.
Examples
Uses markForCheck, setInput, signal changes, event listeners, dirty views, and an application provider configuration.
What it assumes
Assumes familiarity with Zone.js and Angular change-detection internals while preserving Angular change detection itself.
What you can do after
Operate/configure experimental zoneless scheduling and identify the application events that must trigger UI updates.
How it connects
Connects Zone.js, change detection, signals, observables, async pipe, and OnPush components.

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.