docs/en/release-info/migration-guides/abp-10-6-angular-22.md
//[doc-seo]
{
"Description": "Upgrade your ABP solutions to Angular version 22.0.x"
}
This guide explains how to upgrade ABP Angular applications to Angular 22 and TypeScript 6.
Update all frontend dependencies together to maintain compatibility:
@angular/* → ~22.0.0typescript → ~6.0.0@abp/* → corresponding ABP version (10.6)@volo/*, @volosoft/* (if applicable) → corresponding ABP version (10.6)angular-oauth2-oidc (if applicable) → ~22.0.0Avoid mixing Angular 21 and Angular 22 packages within the same workspace.
Before starting the upgrade:
Update package versions in package.json.
Run the Angular or Nx migration commands applicable to your project.
Remove existing installation artifacts:
node_modulespackage-lock.json, yarn.lock, or pnpm-lock.yaml)Reinstall all dependencies.
Build the application and resolve any compilation or template errors.
Projects that still use downlevelIteration: true may encounter TypeScript 6 deprecation diagnostics.
Add the following temporary setting to your root tsconfig file (and library production configurations if required):
{
"compilerOptions": {
"downlevelIteration": true,
"ignoreDeprecations": "6.0"
}
}
As a long-term solution, remove downlevelIteration when your target runtime environment no longer requires it.
Angular 22 introduces updated change detection behavior for components that do not explicitly configure a change detection strategy.
Common symptoms include:
Recommended approaches:
signal() for component state.toSignal() when consuming observable streams.async pipe for observable-based UI state.ChangeDetectionStrategy.Eager only as a temporary compatibility measure for legacy components.ListService)When working with ListService, prefer converting observable results to signals instead of manually subscribing.
readonly data = toSignal(
this.list.hookToQuery(query => this.service.getList(query)),
{ initialValue: { items: [], totalCount: 0 } },
);
Update template bindings accordingly:
data.items → data().itemsdata.totalCount → data().totalCountFor components such as abp-modal, abp-button, and permission or feature management dialogs, maintain state using signals.
readonly isModalVisible = signal(false);
readonly modalBusy = signal(false);
<abp-button [loading]="modalBusy()" />
<abp-modal
[visible]="isModalVisible()"
(visibleChange)="isModalVisible.set($event)"
[busy]="modalBusy()"
/>
If you use *abpReplaceableTemplate, pass signal values through inputs.value and update state through the corresponding event callbacks.
Angular 22 enables strictTemplates by default.
Resolve template typing issues where possible, or temporarily disable strict template checking:
{
"angularCompilerOptions": {
"strictTemplates": false
}
}
Common adjustments include:
?.) and null coalescing (??) usageApplications that rely on upload progress events should include the XHR backend in browser-side HTTP configuration:
provideHttpClient(withFetch(), withXhr());
Do not enable the XHR backend in server-side rendering (SSR) bootstrap code.
abp-chart)If charts do not update after asynchronous data loading:
[data]="chartData()")reinit() after assigning new data rather than relying solely on refresh()If your project contains customized copies of ABP modules such as Identity, Tenant Management, Account, or CMS Kit:
After completing the upgrade, verify that:
| Symptom | Likely Cause | Resolution |
|---|---|---|
Form type conflicts (AbstractControl, etc.) | Multiple Angular versions installed | Align package versions and perform a clean reinstall |
TypeScript deprecation errors related to downlevelIteration | TypeScript 6 diagnostics | Add ignoreDeprecations: "6.0" temporarily |
| Errors involving optional configuration or environment properties | Stricter type checking | Add null checks and optional chaining where appropriate |
| DTO or library compilation issues | Type incompatibilities in DTO definitions | Prefer interfaces and optional properties where appropriate |
| Upload progress events are not emitted | Missing XHR backend configuration | Add withXhr() to browser-side HTTP configuration |
| Charts remain empty after data loads | State changes are not being detected | Use signals and call reinit() after updating chart data |
When upgrading to Angular 22, focus on the following areas:
toSignal(), or the async pipe where appropriate.