Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(core): RemoveprovideZonelessChangeDetection requirement when ZoneJS is not present#62655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
atscott wants to merge1 commit intoangular:main
base:main
Choose a base branch
Loading
fromatscott:selectSchedulerDynamically

Conversation

atscott
Copy link
Contributor

This change updates the internals to provide zoneless scheduling by default when ZoneJS. Developers may still need to useprovideZonelessChangeDetection in the providers if the application exists alongside another one that uses ZoneJS (because ZoneJS would then be present and the zone-based change detection scheduler would then be selected). For most applications, this will be sufficient for selecting the correct scheduler without needing the provider.

This is one step towards zoneless by default, but does not yet go as far as removing theprovideZoneChangeDetection from the internals. That would/will be larger breaking change since it will require existing Zone-based applications to manually includeprovideZoneChangeDetection to the application providers (and for all tests).

BREAKING CHANGE: Applications that configure a custom zoneless implementation now anddo not want the Angular zoneless scheduler to be enabled will need to includeprovideZoneChangeDetection as well as a provider forNgZone in the application providers:

bootstrapApplication(App, {providers: [  provideZoneChangeDetection(),  {provide: NgZone, useClass: MyNoopNgZone}]});

mauriziocescon, ncamera, eneajaho, sheikalthaf, nifiro, and shannonvc reacted with hooray emojiJeanMeche, ncamera, eneajaho, ThomOrlo, IgorSedov, sheikalthaf, nifiro, andgdk, and itea-dev reacted with rocket emoji
@atscottatscott added the target: majorThis PR is targeted for the next major release labelJul 15, 2025
@angular-robotangular-robotbot added detected: breaking changePR contains a commit with a breaking change detected: featurePR contains a feature commit area: coreIssues related to the framework runtime labelsJul 15, 2025
@ngbotngbotbot added this to theBacklog milestoneJul 15, 2025
@atscottatscott modified the milestones:Backlog,v21 CandidateJul 15, 2025
…ZoneJS is not presentThis change updates the internals to provide zoneless scheduling bydefault when ZoneJS. This change means that for most applications,simply omitting the ZoneJS polyfill will be enough to use zonelesschange detection.Developers may still need to use `provideZonelessChangeDetection` in the providers if the applicationexists alongside another one that uses ZoneJS (because ZoneJS would thenbe present and the zone-based change detection scheduler would then beselected).This is one step towards zoneless by default, but does not yet go as faras removing the `provideZoneChangeDetection` from the internals. Thatwould/will be larger breaking change since it will require existingZone-based applications to manually include `provideZoneChangeDetection`to the application providers (and for all tests).This approach works well because all existing Zone-based applications_must_ have ZoneJS already included on the page for them to work. Inaddition, this does not affect existing zoneless applications becausethey all must already manually use `provideZonelessChangeDetection`since the only scheduler provided by default prior to this change wasthe zone-based one. Only "custom" zoneless (zoneless apps prior to realzoneless support) may be affected.BREAKING CHANGE: Applications that configure a custom zoneless implementationnow and _do not_ want the Angular zoneless scheduler to be enabled willneed to include `provideZoneChangeDetection` as well as a providerfor `NgZone` in the application providers:```bootstrapApplication(App, {providers: [  provideZoneChangeDetection(),  {provide: NgZone, useClass: MyNoopNgZone}]});```
@atscottatscottforce-pushed theselectSchedulerDynamically branch from65cea4b to73a7685CompareJuly 15, 2025 21:00
atscott added a commit to atscott/angular-cli that referenced this pull requestJul 15, 2025
This change updates applications to omit the ZoneJS dependency bydefault. It depends onangular/angular#62655,which allows us to also exclude the `provideZonelessChangeDetection`provider.
atscott added a commit to atscott/angular-cli that referenced this pull requestJul 16, 2025
This change updates applications to omit the ZoneJS dependency bydefault. It depends onangular/angular#62655,which allows us to also exclude the `provideZonelessChangeDetection`provider.
atscott added a commit to atscott/angular-cli that referenced this pull requestJul 16, 2025
This change updates applications to omit the ZoneJS dependency bydefault. It depends onangular/angular#62655,which allows us to also exclude the `provideZonelessChangeDetection`provider.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
area: coreIssues related to the framework runtimedetected: breaking changePR contains a commit with a breaking changedetected: featurePR contains a feature committarget: majorThis PR is targeted for the next major release
Projects
None yet
Milestone
v21 Candidate
Development

Successfully merging this pull request may close these issues.

1 participant
@atscott

[8]ページ先頭

©2009-2025 Movatter.jp