Skip to content

Commit ed672ac

Browse files
docs(core): clarify provideZoneChangeDetection usage in v21+
Clarify that zoneless change detection is the default in Angular v21+ and that provideZoneChangeDetection() opts applications into NgZone/ZoneJS-based change detection while also allowing NgZone options such as eventCoalescing to be configured. Fixes angular#67498
1 parent 759ee22 commit ed672ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/core/src/change_detection/scheduling/ng_zone_scheduling.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ export function internalProvideZoneChangeDetection({
134134
* Provides `NgZone`-based change detection for the application bootstrapped using
135135
* `bootstrapApplication`.
136136
*
137-
* `NgZone` is already provided in applications by default. This provider allows you to configure
138-
* options like `eventCoalescing` in the `NgZone`.
137+
* In Angular v21+, zoneless change detection is the default for new applications. Add this
138+
* provider to use `NgZone`/ZoneJS-based change detection, or to configure options like
139+
* `eventCoalescing` in the `NgZone`.
139140
*
140141
* If you need this provider function in an NgModule-based application, pass it as `applicationProviders` to `bootstrapModule()`.
141142
*

0 commit comments

Comments
 (0)