Zoneless Angular
Running Angular without zone.js, now that signals give the framework a precise way to know what changed.
Zoneless Angular
The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.
Not started
What you'll learn
- provideZonelessChangeDetection() removes zone.js from the bootstrap entirely — Angular no longer gets notified about every setTimeout, promise, or event by default.
- Zoneless only works because signals give Angular a precise, built-in notification when relevant state changes — without that, there'd be nothing left to trigger change detection at all.
- Code that mutates plain properties outside Angular's own APIs, with nothing signal-based or OnPush-aware watching it, can silently stop updating the view once zone.js is gone — this is the main migration risk.
Removing the safety net, now that something better exists
Two lessons back, zone.js was the answer to a real problem: Angular has no
native way to observe arbitrary property mutations, so it patches the browser’s
async APIs instead, to at least know when something might have changed. That
workaround has a real cost — broad, conservative notifications leading to
broader-than-necessary change-detection passes — which is exactly the cost
OnPush and signals have each been chipping away at, from different angles,
across the last two lessons.
Zoneless Angular is the logical endpoint: remove zone.js from the picture entirely, now that signals give components a precise, built-in way to tell Angular exactly when something relevant changed, with no blanket “something, somewhere happened” notification required to make that safe.
Turning it on
export const appConfig: ApplicationConfig = {
providers: [provideZonelessChangeDetection(), /* ... */],
};
One line in app.config.ts, and zone.js is gone from the bootstrap — no
monkey-patched setTimeout, no patched promise callbacks, no patched event
listeners reporting back to Angular automatically. From this point on, Angular
relies entirely on explicit, known notification sources: signal changes,
OnPush-recognized input changes, template events, and the async pipe — the
same set OnPush already narrowed change detection down to, just now the only
set, with no zone.js fallback catching anything that falls outside it.
Why this was only safe to do after signals existed
This sequencing matters, and it’s worth being explicit about why zoneless wasn’t a realistic option in Angular’s earlier years. Without signals, a component’s state was mostly plain properties — mutated directly, with nothing watching for the mutation itself. zone.js’s blanket notifications were, for a long time, the only mechanism telling Angular “something happened, maybe re-check.” Remove that mechanism without replacing it with something equally reliable, and you’d have genuinely broken the framework — properties would change, and nothing would ever tell Angular to look again. Signals are what make the removal safe: they’re a real, built-in notification system in their own right, not a workaround bolted onto the side of the framework the way zone.js was.
The actual migration risk
The honest risk in going zoneless isn’t signals-based code — that was already designed to notify Angular directly, with or without zone.js in the picture. It’s code that still relies on zone.js’s blanket safety net without realizing it: a plain, non-signal property mutated from inside a manually-attached native event listener, or from some third-party library’s callback that zone.js used to catch automatically. That kind of code can appear to work fine today, purely because zone.js happens to be watching everything by default — and silently stop updating the view the moment it’s removed, with no error pointing at the cause. Auditing for exactly this pattern is the real work of a zoneless migration, more than any signal-specific rewrite.
This lesson’s video covers hands-on testing of zoneless mode directly — the linked “deeper” video, from closer to this roadmap’s own publication date, goes further into what currently does and doesn’t work cleanly in a zoneless setup, worth checking for the latest state of things given how fast this particular corner of Angular is still moving.
Check yourself
Why was zoneless change detection not a realistic option before signals existed?
Without signals, Angular's only way of finding out something might have changed was zone.js patching async APIs and notifying it broadly. Remove zone.js without replacing that notification mechanism, and nothing would ever tell Angular to re-check anything — the view would simply stop updating. Signals give components a precise, built-in way to notify Angular directly, which is what makes removing the blanket zone.js mechanism safe.
A component has a plain (non-signal) class property that a native DOM event listener — attached manually, outside Angular's own event binding — mutates directly. What's the risk once zone.js is removed?
That mutation happens completely outside anything Angular is watching — no signal notification, no OnPush-recognized input change, nothing zone.js would have caught either, now that it's gone. The view can silently stop reflecting that property's real value, with no error to point at the cause.
Go deeper
Notes
Notes are saved to your account.
Everything else on this page works without one — progress and bookmarks keep themselves in this browser and come with you when you sign in. Notes are the one thing worth not trusting to a browser you might clear.
Your notes could not be loaded.