-
Notifications
You must be signed in to change notification settings - Fork 8
fix(angular): add provide zone change detection in app config #1488
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds Angular’s recommended provideZoneChangeDetection setup to standalone app template app.config.ts files to enable zone change detection with event coalescing.
Changes:
- Imports
provideZoneChangeDetectionfrom@angular/corein multiple templates - Registers
provideZoneChangeDetection({ eventCoalescing: true })in each template’s provider list
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/igx-templates/igx-ts/projects/side-nav/files/src/app/app.config.ts | Adds provideZoneChangeDetection and registers it in providers |
| packages/igx-templates/igx-ts/projects/side-nav-auth/files/src/app/app.config.ts | Adds provideZoneChangeDetection and registers it in providers |
| packages/igx-templates/igx-ts/projects/empty/files/src/app/app.config.ts | Adds provideZoneChangeDetection and registers it in providers |
| packages/igx-templates/igx-ts/projects/_base_with_home/files/src/app/app.config.ts | Adds provideZoneChangeDetection and registers it in providers |
| packages/igx-templates/igx-ts/projects/_base/files/src/app/app.config.ts | Adds provideZoneChangeDetection and registers it in providers |
Comments suppressed due to low confidence (1)
packages/igx-templates/igx-ts/projects/_base_with_home/files/src/app/app.config.ts:1
provideZoneChangeDetection(...)returnsEnvironmentProviders(not aProvider). Withconst providers: Provider = [...], this is likely to cause a TypeScript type error. Prefer typing this asApplicationConfig['providers'](orArray<Provider | EnvironmentProviders>) or dropping the explicitProvidertype so the array can include environment providers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #1487
Additional information related to this pull request: Add provideZoneChangeDetection in the app.config files for angular standalone applications. This is the recommended way to setup the zone change detection now in Angular.