Release insightsAngular 22

What Angular 22 brought, release by release: features that changed stage, the migrations ng update runs, every commit, and the tooling around it.

Released 3 Jun 2026 Latest 22.3.0

Migration guide

What changes when moving to each Angular 22.x release and how to migrate, rated by criticality, difficulty and impact.

22.0 → 22.1

Released 29 Jul 2026No breaking changes12 / 12 changes

Angular 22.1 ships no breaking changes, but it tightens several security defaults (XSRF, Meta tags, SSR), deprecates JSONP and changes how the SSR transfer cache and prerendering behave. Most apps can update in minutes; review the high-criticality items first.

Step 1 — update the packages

ng update @angular/core@22.1 @angular/cli@22.1

Then go through the changes below, most critical first.

HighSecurityBehavior change Easy since 22.1.0

XSRF protection is now enabled for the root-provided HttpClient

Previously, injecting HttpClient without calling provideHttpClient() left the XSRF interceptor out of the chain. It is now included by default, so mutating requests carry the X-XSRF-TOKEN header read from the XSRF-TOKEN cookie.

@angular/common/http

Who is affected: Apps injecting HttpClient without an explicit provideHttpClient() call, especially if the backend uses custom XSRF cookie/header names or strict CORS header allow-lists.

How to migrate
  1. Search your bootstrap config for provideHttpClient( . If it is missing, your app relied on the root-provided HttpClient and is affected.
  2. If your backend uses non-default names, declare them explicitly: provideHttpClient(withXsrfConfiguration({ cookieName: '…', headerName: '…' })) .
  3. If a proxy or backend rejects unknown headers, allow X-XSRF-TOKEN (or your custom header) on mutating endpoints.
  4. Only if you have a deliberate reason, opt out with provideHttpClient(withNoXsrfProtection()) and document why.
  5. Smoke-test POST/PUT/PATCH/DELETE calls after the update.

Before

// app.config.ts — no HTTP provider, XSRF interceptor was NOT applied
export const appConfig: ApplicationConfig = {
  providers: [provideRouter(routes)],
};

After

// app.config.ts — explicit and self-documenting
export const appConfig: ApplicationConfig = {
  providers: [
    provideRouter(routes),
    provideHttpClient(
      withXsrfConfiguration({
        cookieName: "XSRF-TOKEN",
        headerName: "X-XSRF-TOKEN",
      }),
    ),
  ],
};
HighSecuritySecurity fix Trivial since 22.1.0

Stay on the latest 22.1.x patch: security hardening

The 22.1 patch line contains a series of hardening fixes: host binding sanitization, TransferState prototype-pollution protection, SSR origin validation, public directory containment in CommonEngine, oversized fetch body cancellation and MCP roots enforcement in the CLI.

@angular/core@angular/common/http@angular/platform-server@angular/ssr@angular/cli

Who is affected: Every app, and SSR apps in particular (TransferState, origin validation, asset path resolution).

How to migrate
  1. Update to the latest 22.1.x patch rather than stopping at 22.1.0 (the update command above resolves the latest 22.1 patch).
  2. Keep @angular/core, @angular/ssr and @angular/cli on matching patch lines.
  3. For SSR apps, re-check that your server only serves files from the intended public directory and that the configured allowed hosts/origins are correct.
  4. Enable automated dependency updates (Renovate/Dependabot) for @angular/* patch releases.
ng update @angular/core@22.1 @angular/cli@22.1
HighBuildBehavior change Moderate since 22.1.7

Prerendering failures now fail the build

When a route fails to prerender, the build now fails and the route is excluded, instead of silently producing a broken or missing page.

@angular/build

Who is affected: SSR/SSG apps using prerendering (RenderMode.Prerender or outputMode: 'static'), especially in CI.

How to migrate
  1. Run a production build locally ( ng build ) before merging the update.
  2. For every route reported as failing, reproduce with ng serve and fix the root cause (missing data at build time, browser-only APIs, failing HTTP calls).
  3. Guard browser-only code with afterNextRender() or isPlatformBrowser() .
  4. If a route cannot be prerendered, switch it to RenderMode.Server or RenderMode.Client in your server routes config instead of letting it fail.

Example

// app.routes.server.ts
export const serverRoutes: ServerRoute[] = [
  { path: "dashboard/**", renderMode: RenderMode.Client },
  { path: "products/:id", renderMode: RenderMode.Server },
  { path: "**", renderMode: RenderMode.Prerender },
];
MediumSecurityBehavior change Trivial since 22.1.3

Meta service rejects event handler attributes

Meta.addTag(), addTags() and updateTag() now throw a RuntimeError (NG05203) when an attribute starting with on is passed, to prevent XSS through meta elements.

@angular/platform-browser

Who is affected: Code building meta tags from dynamic objects (CMS content, API responses, spread of untrusted data).

How to migrate
  1. Search for addTag( , addTags( and updateTag( usages.
  2. Make sure no on* attribute (onload, onclick…) can reach these calls, especially when the tag definition comes from external data.
  3. Whitelist allowed keys (name, property, content, charset…) when mapping CMS data to MetaDefinition.

Before

// Forwards whatever the CMS returns
this.meta.addTag({ ...cmsTag });

After

const { name, property, content } = cmsTag;
this.meta.addTag({ name, property, content });
MediumSSRBehavior change Easy since 22.1.0

SSR transfer cache skips credentialed and non-cacheable requests

The HTTP transfer cache no longer stores requests sent with credentials, responses with Set-Cookie, or responses whose Cache-Control forbids caching. Two new options let you opt back in explicitly.

@angular/common/http@angular/platform-browser

Who is affected: SSR apps with hydration that call authenticated APIs (withCredentials, cookies) or APIs returning Cache-Control: no-store/private.

How to migrate
  1. After updating, load an SSR page with DevTools open: requests that were served from TransferState and are now repeated on the client are affected.
  2. Decide per case: duplicate requests are safer when the HTML may be cached by a CDN or shared between users.
  3. If the rendered HTML is never shared, opt back in with withHttpTransferCacheOptions({ includeRequestsWithCredentials: true }) and/or includeNonCacheableRequests: true .
  4. Prefer fixing the API's Cache-Control headers over enabling includeNonCacheableRequests globally.

Example

provideClientHydration(
  withHttpTransferCacheOptions({
    includeRequestsWithCredentials: true,
    includeNonCacheableRequests: false,
  }),
);
MediumReliabilityBehavior change Easy since 22.1.1

Root interceptors always run with withRequestsMadeViaParent()

Root interceptors now consistently run at the end of the chain for child HttpClient configurations. Combining withRequestsMadeViaParent() and withFetch() in the same provideHttpClient() call now throws a configuration error.

@angular/common/http

Who is affected: Apps providing HttpClient again in lazy routes or components with withRequestsMadeViaParent().

How to migrate
  1. Search for withRequestsMadeViaParent( .
  2. Remove withFetch() from those child provideHttpClient() calls: the fetch backend is inherited from the parent.
  3. Check that interceptors are not applied twice (e.g. auth headers or logging): order is now child → parent → root for requests.

Before

// lazy route providers
provideHttpClient(withRequestsMadeViaParent(), withFetch())

After

// withFetch() stays in the root config only
provideHttpClient(
  withRequestsMadeViaParent(),
  withInterceptors([featureInterceptor]),
)
MediumMaintenanceDeprecation Moderate since 22.1.0

JSONP support is deprecated

HttpClient.jsonp(), HttpClientJsonpModule, withJsonpSupport() and the related JSONP classes are deprecated and will be removed in a future major. Use regular HTTP requests with CORS instead.

@angular/common/http

Who is affected: Apps calling third-party or legacy endpoints through JSONP.

How to migrate
  1. Search for jsonp( , withJsonpSupport and HttpClientJsonpModule .
  2. Check whether the endpoint supports CORS; if it does, switch to http.get() .
  3. If it doesn't, ask the API owner for CORS support or proxy the call through your own backend (or the SSR server).
  4. Remove withJsonpSupport() / HttpClientJsonpModule once no JSONP call remains.

Before

provideHttpClient(withJsonpSupport());

this.http.jsonp<Weather>(url, "callback");

After

provideHttpClient();

this.http.get<Weather>(url); // endpoint must send CORS headers
LowMaintenanceDeprecation Trivial since 22.1.0

stringToFileBuffer / fileBufferToString are deprecated

The @angular-devkit/core buffer helpers are deprecated in favor of the standard TextEncoder / TextDecoder Web APIs.

@angular-devkit/core

Who is affected: Authors of custom schematics, builders or Nx/CLI plugins. Regular apps are not affected.

How to migrate
  1. Search for stringToFileBuffer and fileBufferToString .
  2. Replace them with new TextEncoder().encode() and new TextDecoder().decode() .

Before

import { fileBufferToString, stringToFileBuffer } from "@angular-devkit/core";

const text = fileBufferToString(buffer);
const buffer = stringToFileBuffer(text);

After

const text = new TextDecoder().decode(buffer);
const buffer = new TextEncoder().encode(text);
LowDevXNew feature Easy since 22.1.0

Optional: migrate @Injectable to @Service

A new schematic converts @Injectable({ providedIn: 'root' }) classes to the @Service() decorator. It is optional and can be run folder by folder.

@angular/core

Who is affected: Codebases wanting to align with the modern service authoring style.

How to migrate
  1. Commit your work, then run the schematic on the whole app or a sub-path ( --path src/app/feature ).
  2. Review classes the schematic skipped: constructor injection, extra @Injectable options or providedIn other than 'root'.
  3. Convert constructor injection to inject() first if you want those classes migrated too.
  4. Run your tests and lint.
ng generate @angular/core:service

Before

@Injectable({ providedIn: "root" })
export class CartStore {
  private readonly http = inject(HttpClient);
}

After

@Service()
export class CartStore {
  private readonly http = inject(HttpClient);
}
LowDevXNew feature Easy since 22.1.0

Optional: custom set on linkedSignal

linkedSignal accepts a set option called by set() and update(). It lets a derived signal write back to its source, replacing effect-based synchronization.

@angular/core

Who is affected: Code syncing two signals with effect() or manual writes (unit conversions, editing a property of a parent object).

How to migrate
  1. Look for effect() calls whose only job is to write a signal derived from another one.
  2. Replace them with a linkedSignal whose set option updates the source signal.
  3. Use the second rawSet argument if you also need to update the linkedSignal's own value.

Before

const order = signal<Order>(initialOrder);
const shipping = signal(order().shippingMethod);

effect(() => {
  const method = shipping();
  order.update((o) => ({ ...o, shippingMethod: method }));
});

After

const order = signal<Order>(initialOrder);
const shipping = linkedSignal(() => order().shippingMethod, {
  set: (method) =>
    order.update((o) => ({ ...o, shippingMethod: method })),
});
LowDevXNew feature Moderate since 22.1.0

Optional: CSS variable namespacing for multi-app pages

An opt-in compiler feature prefixes CSS custom properties declared in component styles with an app namespace, so several Angular apps (micro-frontends) can share a page without leaking variables. Global stylesheets are not namespaced.

@angular/core@angular/compiler

Who is affected: Micro-frontend setups or widgets embedded next to other Angular apps.

How to migrate
  1. Enable it with provideCssVarNamespacing() in app.config.ts, using a namespace that matches your APP_ID plus a separator (e.g. my-app_ ).
  2. Prefix variables that must stay shared across apps with --global-- (e.g. --global--brand-color ). Names like --global-foo are rejected by the compiler.
  3. Replace JavaScript reads/writes of CSS variables ( style.setProperty('--x', …) ) with the CssVarNamespacer service so names are namespaced consistently.
  4. Verify theming: variables defined in global styles.css are not namespaced, only component styles are.
LowPerformanceNew feature Trivial since 22.1.0

Build: shared cache across worktrees and server chunk optimization

The persistent build cache is now shared across git worktrees with an SQLite store fallback, server builds get chunk optimization (Rolldown by default), and debug IDs make SRI hashes stable.

@angular/build

Who is affected: Every app using the application builder; no code change required.

How to migrate
  1. Nothing to change: run ng build and compare bundle budgets and server output with 22.0.
  2. If you use several git worktrees, expect faster cold builds from the shared cache.
  3. Report regressions in server bundles to the Angular CLI repository.