Angular v22.3.1 was released on 25 November 2026. It’s a patch release, but a large one: more than 30 fixes across core, the compiler, forms, the router, HTTP and server-side rendering. One of them is a security hardening of the HTML sanitizer. Several others fix problems with error boundaries, hydration and server-side rendering that you may have been working around.

There’s also a deadline involved. Angular 20 reaches end of life on 28 November 2026, so if you’re still on 20, you should move to 22.3.1 now rather than to an earlier 22.x patch.

This post picks out the fixes most likely to affect real apps and explains what each one means in practice.

How to upgrade

From any 22.x version:

ng update @angular/[email protected] @angular/cli@22

If you’re coming from Angular 20 or 21, use the official update guide and go one major version at a time. The CLI runs the migrations for you.

Check the result:

ng version

Security: sanitized links can no longer expose window.opener

When you bind untrusted HTML with [innerHTML], Angular sanitizes it first. The sanitizer allowed both rel and target attributes on links but didn’t filter the rel tokens. According to the fix commit, that caused two problems:

  • Sanitized HTML could keep rel="opener". That opts out of the browser’s default noopener behaviour for target="_blank", so the opened page could reach back through window.opener.
  • Links with a custom named target (such as target="preview") could open without noopener.

In 22.3.1 the sanitizer strips the opener token from rel, and adds noopener to <a> and <area> elements with custom target names.

@Component({
  selector: 'app-comment',
  template: `<div [innerHTML]="comment.html"></div>`,
})
export class CommentComponent {
  @Input({ required: true }) comment!: { html: string };
}

If comment.html contains <a href="https://evil.example" target="_blank" rel="opener">, the rendered link no longer carries rel="opener" after the upgrade. You don’t need to change any code. This is the main reason to treat 22.3.1 as a priority patch if your app renders user-generated HTML.

Error boundaries now catch @defer errors

Angular’s error boundaries (the template @boundary block, plus router error boundaries with an onError callback) exist so one broken component doesn’t take down the whole page. But errors thrown while rendering a @defer block, such as a constructor error in a lazily loaded component, skipped those boundaries and went straight to the global uncaught-error handler.

The defer fix routes those errors through the nearest boundary first:

@boundary {
  @defer (on viewport) {
    <app-sales-chart />
  } @placeholder {
    <div class="chart-skeleton"></div>
  }
} @error {
  <p>Chart unavailable. Try again later.</p>
}

The template error boundaries guide covers the full @boundary syntax. The point here is that, from 22.3.1, a failing <app-sales-chart /> shows your fallback instead of only logging an uncaught error.

Router: RedirectCommand from an error boundary works every time

If your route error handling throws a RedirectCommand, for example to send users to /login when a resolver fails with 401, there was a bug. The router tagged each RedirectCommand so it would only be handled once, which made it ignore an instance that was thrown more than once. A shared constant was enough to trigger it:

@Component({ selector: 'app-account', template: `...` })
export class Account {
  private router = inject(Router);
  // One instance, reused for every 401
  private readonly toLogin = new RedirectCommand(this.router.parseUrl('/login'));

  profile = resource({
    loader: async () => {
      const res = await fetch('/api/me');
      if (res.status === 401) throw this.toLogin;
      return res.json();
    },
  });
}

The second time it was thrown, the user stayed on the failing route. The router fix removes the tag, so every thrown RedirectCommand navigates. Two other router fixes cancel active navigation when the router is disposed, and stop dynamic route titles from mutating Route.resolve.

Clearer error for @for over a plain object

This one will save you some debugging time. Looping over an object instead of an array used to fail with a raw, unhelpful error:

@Component({
  template: `@for (item of items; track item) { {{ item }} }`,
})
export class App {
  items = { 0: 'a', 1: 'b' }; // not iterable
}

The old message was TypeError: t[Symbol.iterator] is not a function, which, in a minified production build, tells you nothing. Now Angular throws the coded error NG0957, which names @for as the problem. The fix is the same as before: convert the object first, for example with Object.values() or the keyvalue pipe.

Signal forms: Infinity and NaN count as empty

For signal-based forms, non-finite numbers (NaN, Infinity, -Infinity) are now treated as empty by the required() validator. That matches what native number inputs do, since they clear infinite values. Two related fixes clear native number inputs for infinite signal form values, and resync a <select> when the text of an option without a value changes.

If you had custom validation that rejected Infinity separately, you can likely remove it.

SSR: in-flight fetch requests are aborted on shutdown

When an SSR platform was destroyed mid-request, HttpClient requests made with withFetch() kept running. That could lead to RxJS EmptyError rejections from firstValueFrom/lastValueFrom, or unhandled promise rejections. The HTTP fix aborts in-flight FetchBackend requests when the injector is destroyed, and doesn’t start a fetch once it’s already destroyed. Related fixes guard platform teardown during bootstrap and in platform-server.

// app.config.ts
export const appConfig: ApplicationConfig = {
  providers: [provideHttpClient(withFetch())],
};

If your SSR logs were full of EmptyError or “unhandled rejection” noise under load, this patch should cut it down.

Hydration fixes

Three fixes target hydration edge cases that produced errors or broken DOM:

  • The first connected node after <ng-content> or @let is anchored correctly during hydration.
  • NG0502 is no longer thrown for nodes after <ng-content> or @let in content that isn’t projected.
  • Nested @defer child blocks are no longer dropped while the parent hydrates.

There’s also a fix that skips animate.enter on hydrated DOM nodes, so server-rendered content doesn’t animate in a second time.

Compiler and migration fixes

The compiler now resolves references to arrow function parameters correctly, and only strips the !important suffix from style and class host bindings. Two migration fixes avoid leaving blank lines when removing imports, and use an aliased Service import correctly in the service migration.

Takeaway

Angular 22.3.1 is the patch to be on before Angular 20 support ends on 28 November. It hardens the HTML sanitizer against window.opener tricks, makes error boundaries catch @defer failures, fixes repeated RedirectCommand redirects, and cleans up SSR shutdown. Run ng update @angular/[email protected], then test any pages that render user HTML or use @defer inside a boundary. The full changelog links every fix to its commit.