Carlos Cifuentes
Glossary

Zoneless change detection

Zoneless change detection runs Angular without Zone.js; the framework updates the view when signals, template events or explicit calls report a change.

For most of its history Angular relied on Zone.js, a library that patches browser APIs such as setTimeout, promises and event listeners. Whenever an asynchronous operation finished, Zone.js told Angular, and Angular checked the component tree for changes. That made updates automatic. It also meant many checks ran when nothing had changed.

In zoneless mode Zone.js is not loaded. Angular schedules change detection only when it receives a specific notification:

  • A signal read in a template changes.
  • An event listener bound in a template fires.
  • The async pipe receives a value.
  • Code calls markForCheck() or sets a component input.

Recent Angular versions enable this mode with provideZonelessChangeDetection() in the application configuration.

Example

A component stores a counter in a plain class field and increments it inside setInterval. With Zone.js the view updates every second. Without it the view stays frozen, because nothing notified Angular. Storing the counter in a signal fixes it:

count = signal(0);

constructor() {
  setInterval(() => this.count.update(n => n + 1), 1000);
}

Common misunderstanding

Zoneless is often understood as "everything must be rewritten with signals". Components that already use OnPush with the async pipe or markForCheck() generally work without changes. The code that breaks is code that mutated plain fields from timers, third-party callbacks or other asynchronous work and relied on Zone.js to notice.

Third-party libraries need a check too, because some still depend on Zone.js behavior. A practical path is to move components to OnPush first and remove Zone.js afterward. In a micro-frontend platform, remotes that run inside the host's Angular application inherit its mode, so their code has to be compatible with it. See the AngularJS to Angular reference for related patterns.

Why it matters. Code migrated today should be written so that it works without Zone.js. In a platform, the host's choice applies to every remote running inside it, so it is a platform-level decision.

Related terms

Planning a migration or a micro-frontend platform?

In a 20-minute call you describe your situation and I tell you how I'd approach it. If it isn't worth doing yet, I'll say so.

Message me on LinkedIn