Skip to content

Angular 21: Manually enable provideZoneChangeDetection and directive type binding updates - #3030

Merged
m-akinc merged 6 commits into
mainfrom
user/makinc/pre-angular-21
Aug 14, 2026
Merged

Angular 21: Manually enable provideZoneChangeDetection and directive type binding updates#3030
m-akinc merged 6 commits into
mainfrom
user/makinc/pre-angular-21

Conversation

@m-akinc

@m-akinc m-akinc commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Pull Request

🤨 Rationale

The Angular 21 update will:

  • make zoneless change detection the default (we need to re-enable zone based change detection)
  • default to type-checking host bindings

We can pre-emptively make the changes that will be necessary, so the actual upgrade change is smaller and quicker to review.

👩‍💻 Implementation

  • Added provideZoneChangeDetection() to the TestBed configuration providers lists (where necessary)
  • Added $any() in bindings to effectively suppress false-positive type errors where the declared types are not specific enough

🧪 Testing

Tests pass

@m-akinc
m-akinc marked this pull request as ready for review August 14, 2026 18:12
Comment thread packages/angular-workspace/example-client-app/src/app/app.component.spec.ts Outdated
@rajsite rajsite changed the title Preparation for Angular 21 upgrade Angular 21: Manually enable provideZoneChangeDetection and directive type binding updates Aug 14, 2026
@m-akinc
m-akinc enabled auto-merge (squash) August 14, 2026 19:25
@m-akinc
m-akinc merged commit 149ab09 into main Aug 14, 2026
12 checks passed
@m-akinc
m-akinc deleted the user/makinc/pre-angular-21 branch August 14, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants