mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commit updates `ApplicationRef.tick` to use `detectChangesInternal` for root views rather than go through the `ChangeDetectorRef.detectChanges` API which refreshes the host view without first looking at whether the view is `OnPush` and not dirty. The current behavior would hide errors in `OnPush` components that do not correctly get marked for check and would break when migrating to zoneless change detection because `markForCheck` was never called so change detection was never scheduled. The error would be surprising and blamed on switching to zoneless when in reality the issue already exists and is a problem with the component not calling `markForCheck`. However, this error is hidden today because `ApplicationRef.tick` refresh host bindings unconditionally. BREAKING CHANGE: `OnPush` views at the root of the application need to be marked dirty for their host bindings to refresh. Previously, the host bindings were refreshed for all root views without respecting the `OnPush` change detection strategy. PR Close #53718 |
||
|---|---|---|
| .. | ||
| global | ||
| primitives/signals | ||
| reference-manifests | ||
| rxjs-interop | ||
| schematics | ||
| src | ||
| test | ||
| testing | ||
| BUILD.bazel | ||
| index.ts | ||
| package.json | ||
| PACKAGE.md | ||
| public_api.ts | ||