Change8

Migrating to Angular v22.0.0-next.7

Version v22.0.0-next.7 introduces 6 breaking changes. This guide details how to update your code.

Released: 4/8/2026

6
Breaking Changes
4
Migration Steps
7
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

appRef.bootstrapComponentFactoryResolverComponentFactoryViewContainerRef.createComponentCanMatchFnCanMatchcanMatch

Breaking Changes

Issue #1

The second argument of appRef.bootstrap no longer accepts `any`. Ensure the element passed is not nullable.

Issue #2

TypeScript versions older than 6.0 are no longer supported.

Issue #3

ComponentFactoryResolver and ComponentFactory are no longer available. Pass the component class directly to APIs that previously required a factory, such as ViewContainerRef.createComponent or use the standalone createComponentFunction.

Issue #4

ComponentFactoryResolver and ComponentFactory are no longer available. Pass the component class directly to APIs that previously required a factory, such as ViewContainerRef.createComponent or use the standalone createComponent function.

Issue #5

Styles are removed when they appear unused by an associated host. This may cause other DOM elements outside of Angular or those not using ViewEncapsulation.Emulated to appear unstyled.

Issue #6

The currentSnapshot parameter in CanMatchFn and the canMatch method of the CanMatch interface is now required. Existing class implementations of CanMatch must now include the third argument to satisfy the interface.

Migration Steps

  1. 1
    Ensure the element passed to appRef.bootstrap is not nullable.
  2. 2
    Update TypeScript to version 6.0 or newer.
  3. 3
    Replace usages of ComponentFactoryResolver and ComponentFactory with direct component class usage in APIs like ViewContainerRef.createComponent, or use the standalone createComponent function.
  4. 4
    If implementing CanMatch interface, ensure the canMatch method now accepts the required third argument (currentSnapshot).

Release Summary

This release introduces new features like configuration-based application bootstrapping and directive de-duplication, while removing deprecated APIs like ComponentFactoryResolver and dropping support for older TypeScript versions.

Need More Details?

View the full release notes and all changes for Angular v22.0.0-next.7.

View Full Changelog