# Angular version notes — what changed between v20, v21 and v22

Shared by every Angular skill in this catalog. Verified 2026-09 against https://angular.dev/reference/releases and the pages linked per row. **v22 is the current major (released 2026-06-03); v21 and v20 are LTS; v19 and below are unsupported.**

| Topic | v20 (LTS, ends 2026-11) | v21 (LTS) | v22 (Active) | Source |
|---|---|---|---|---|
| Zoneless change detection | Opt-in: `provideZonelessChangeDetection()` in `app.config.ts`, remove `zone.js` from `polyfills` | **Default** for new apps; provider not needed | Default | https://angular.dev/guide/zoneless |
| `ChangeDetectionStrategy.OnPush` | Generated components use `Default` — write `OnPush` explicitly | Same | **OnPush is the default** when `changeDetection` is omitted (not a defect); `ChangeDetectionStrategy.Default` is deprecated → `Eager` for the check-always opt-out; `ng generate component --change-detection` accepts `OnPush` (default) or `Eager` | https://angular.dev/api/core/ChangeDetectionStrategy, https://angular.dev/cli/generate/component |
| Unit-test runner | Karma default; Vitest via `@angular/build:unit-test` experimental | **Vitest default** for new projects; Karma "still supported" | Same | https://angular.dev/guide/testing |
| Signal Forms (`@angular/forms/signals`) | Not available | Experimental (requires v21+) | **Stable** — `form()`, `[formField]`, `required()`, `submit()` | https://angular.dev/guide/forms/signals/overview, https://angular.dev/api/forms/signals/form |
| `resource()`, `rxResource()`, `httpResource()` | Experimental | Experimental | **Stable since v22.0** | https://angular.dev/guide/signals/resource, https://angular.dev/api/core/rxjs-interop/rxResource, https://angular.dev/api/common/http/httpResource |
| Angular Aria (`@angular/aria`) | — | Preview | **Stable** headless accessible directives | https://angular.dev/guide/aria/overview, https://angular.dev/events/v22 |
| `@Service()` decorator | — | — | New: shorthand for `@Injectable({ providedIn: 'root' })`, `inject()`-only | https://angular.dev/guide/di/creating-and-using-services |
| Incremental hydration | `provideClientHydration(withIncrementalHydration())` | Same | **On by default** in `provideClientHydration()`; `withIncrementalHydration()` deprecated, "intent to remove in v24"; opt out with `withNoIncrementalHydration()` | https://angular.dev/api/platform-browser/withIncrementalHydration, https://angular.dev/guide/incremental-hydration |
| Event replay | `withEventReplay()` | Same | Enabled automatically by incremental hydration — drop `withEventReplay()` | https://angular.dev/guide/incremental-hydration |
| `@angular/animations` | Deprecated from 20.2, when `animate.enter`/`animate.leave` arrive | Deprecated | **Deprecated**; `provideNoopAnimations` "intent to remove in v23" | https://angular.dev/guide/animations/migration, https://angular.dev/api/platform-browser/animations/provideNoopAnimations |
| `afterRender` | **Renamed `afterEveryRender`** (no alias); `afterNextRender` unchanged. Phases are object keys — `afterNextRender({ earlyRead, write, mixedReadWrite, read })` — there is no `AfterRenderPhase` enum | — | — | https://angular.dev/api/core/afterEveryRender, https://angular.dev/api/core/afterNextRender |
| `effect()` | Stable since v20; signal writes inside effects allowed (`allowSignalWrites` removed in v19) | — | — | https://angular.dev/api/core/effect |
| `TestBed.flushEffects()` | Available | Deprecated → `TestBed.tick()` | Deprecated → `TestBed.tick()` | https://angular.dev/api/core/testing/TestBed |
| File naming | CLI 20 generates `user-profile.ts` / `.html` / `.css` (no `.component` suffix); style guide updated | Same | Same | https://angular.dev/style-guide |
| `HttpClient` backend | `fetch` via `withFetch()` | — | `fetch` is the default; `withXhr()` opts back in (avoid on SSR) | https://angular.dev/guide/http/setup |
| Release cadence | 6-month majors | 6-month majors | **12-month majors**, 4–6 minors each, 24 months of support (12 active + 12 LTS) | https://angular.dev/reference/releases |

## How to phrase version guidance in generated code

- Targeting v22: rely on the defaults (no `provideZonelessChangeDetection()`, no `withIncrementalHydration()`, no `withEventReplay()`), still write `changeDetection: ChangeDetectionStrategy.OnPush` when the repo mixes versions or lint expects it.
- Targeting v20 or v21: add the provider lines above explicitly and treat Signal Forms and `httpResource` as experimental — prefer Typed Reactive Forms and `toSignal()`.
- Below v20: the codebase is unsupported; the first deliverable is an upgrade plan (see `angular-migration`).
