How the Screen Updates
Change detection is Angular checking your data and updating the HTML. It must run at the right moments: after a click, a timer or an HTTP response.
Zone.js (the Old Way)
zone.js patches browser APIs (events, timers, promises). When any of them finishes, Angular runs change detection for the whole component tree. It is simple and works automatically, but it can do extra work and adds bundle size.
OnPush
With ChangeDetectionStrategy.OnPush a component is checked only when:
- An
input()value changed (new reference) - An event happened inside the component (click and so on)
- A signal used in its template changed
- An
asyncpipe received a value - You call
markForCheck()
Immutable Updates
Going Zoneless
Signals tell Angular exactly what changed, so zone.js is not needed. Zoneless apps are smaller, faster and have cleaner stack traces. Angular is moving in this direction, and recent versions make it the recommended path for new apps.
app.config.ts already contains the zoneless provider and whether zone.js is listed in angular.json polyfills.
Then remove zone.js from the polyfills array in angular.json (and from test polyfills) and uninstall it if you do not use it.
What Triggers an Update When Zoneless?
| Trigger | Works? |
|---|---|
| Signal changes read in the template | Yes |
Template event listeners ((click)) | Yes |
async pipe emits | Yes |
markForCheck() call | Yes |
| Input/output changes of components | Yes |
A plain property changed in setTimeout | No. Use a signal |
Fixing Code That Relied on Zone.js
Migration Checklist
- Make all components
OnPush - Replace mutable fields used in templates with signals
- Use
asyncpipe ortoSignalfor observables - Add
provideZonelessChangeDetection() - Remove
zone.jspolyfill and run all tests - Check third-party libraries support zoneless (many UI libraries do now)
- Use the official zoneless migration schematic or guide on angular.dev if available for your version
ExpressionChangedAfterItHasBeenChecked). Read these errors, they point to the exact fix.
Conclusion
OnPush plus signals lets Angular update only what changed. With that foundation you can remove zone.js, ship less code and get predictable updates.

