Skip to content

Commit 8718abc

Browse files
committed
fix(core): Deprecate ignoreChangesOutsideZone option (#57029)
This option was introduced out of caution as a way for developers to opt out of the new behavior in v18 which schedule change detection for the above events when they occur outside the Zone. After monitoring the results post-release, we have determined that this feature is working as desired and do not believe it should ever be disabled by setting this option to `true`. PR Close #57029
1 parent d4ff6bc commit 8718abc

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

‎goldens/public-api/core/index.api.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ export function booleanAttribute(value: unknown): boolean;
174174

175175
// @public
176176
export interface BootstrapOptions {
177+
// @deprecated
177178
ignoreChangesOutsideZone?: boolean;
178179
ngZone?: NgZone | 'zone.js' | 'noop';
179180
ngZoneEventCoalescing?: boolean;
@@ -1246,6 +1247,7 @@ export class NgZone {
12461247
// @public
12471248
export interface NgZoneOptions {
12481249
eventCoalescing?: boolean;
1250+
// @deprecated
12491251
ignoreChangesOutsideZone?: boolean;
12501252
runCoalescing?: boolean;
12511253
}

‎packages/core/src/application/application_ref.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,15 @@ export interface BootstrapOptions {
159159
* - calling `ChangeDetectorRef.markForCheck`
160160
* - calling `ComponentRef.setInput`
161161
* - updating a signal that is read in a template
162-
* - when bound host or template listeners are triggered
163162
* - attaching a view that is marked dirty
164163
* - removing a view
165164
* - registering a render hook (templates are only refreshed if render hooks do one of the above)
165+
*
166+
* @deprecated This option was introduced out of caution as a way for developers to opt out of the
167+
* new behavior in v18 which schedule change detection for the above events when they occur
168+
* outside the Zone. After monitoring the results post-release, we have determined that this
169+
* feature is working as desired and do not believe it should ever be disabled by setting
170+
* this option to `true`.
166171
*/
167172
ignoreChangesOutsideZone?: boolean;
168173
}

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,15 @@ export interface NgZoneOptions {
223223
* - calling `ChangeDetectorRef.markForCheck`
224224
* - calling `ComponentRef.setInput`
225225
* - updating a signal that is read in a template
226-
* - when bound host or template listeners are triggered
227226
* - attaching a view that is marked dirty
228227
* - removing a view
229228
* - registering a render hook (templates are only refreshed if render hooks do one of the above)
229+
*
230+
* @deprecated This option was introduced out of caution as a way for developers to opt out of the
231+
* new behavior in v18 which schedule change detection for the above events when they occur
232+
* outside the Zone. After monitoring the results post-release, we have determined that this
233+
* feature is working as desired and do not believe it should ever be disabled by setting
234+
* this option to `true`.
230235
*/
231236
ignoreChangesOutsideZone?: boolean;
232237
}

0 commit comments

Comments
 (0)