angular.courses

NG update Migrations — Angular 21

Migrations available with the ng update Angular CLI command for Angular 21. Details and example diffs below.

use-application-builder

angular-cliIntroduced 18.0.0

Migrate application projects using '@angular-devkit/build-angular:browser' and '@angular-devkit/build-angular:browser-esbuild' to use the '@angular-devkit/build-angular:application' builder. Read more about this here: https://angular.dev/tools/cli/esbuild#using-the-application-builder

No example diff available for this migration yet.

Availability

  • 18.0.0introducedoptional
  • 19.0.0optional
  • 20.0.0optional
  • 21.0.0optional

control-flow-migration

angularIntroduced 20.0.0

Converts the entire application to block control flow syntax

No example diff available for this migration yet.

Availability

  • 20.0.0introducedoptional
  • 21.0.0

update-module-resolution

angular-cliIntroduced 20.0.0

Update 'moduleResolution' to 'bundler' in TypeScript configurations. You can read more about this, here: https://www.typescriptlang.org/tsconfig/#moduleResolution

No example diff available for this migration yet.

Availability

  • 20.0.0introduced
  • 21.0.0

remove-default-karma-config

angular-cliIntroduced 20.2.0

Remove any karma configuration files that only contain the default content. The default configuration is automatically available without a specific project file.

No example diff available for this migration yet.

Availability

  • 20.2.0introduced
  • 21.0.0

router-current-navigation

angularIntroduced 20.2.0

Replaces usages of the deprecated Router.getCurrentNavigation method with the Router.currentNavigation signal

No example diff available for this migration yet.

Availability

  • 20.2.0introducedoptional
  • 21.0.0optional

add-bootstrap-context-to-server-main

angularIntroduced 20.3.0

Adds `BootstrapContext` to `bootstrapApplication` calls in `main.server.ts` to support server rendering.

No example diff available for this migration yet.

Availability

  • 20.3.0introduced
  • 21.0.0

application-config-core

angular21.0.0

Moves imports of `ApplicationConfig` from `@angular/platform-browser` to `@angular/core`

No example diff available for this migration yet.

bootstrap-options-migration

angular21.0.0

Migrates deprecated bootstrap options to providers.

No example diff available for this migration yet.

router-last-successful-navigation

angular21.0.0

Ensures that the Router.lastSuccessfulNavigation signal is now invoked

No example diff available for this migration yet.

update-typescript-lib

angular-cli21.0.0

Updates the 'lib' property in tsconfig files to use 'es2022' or a more modern version.

No example diff available for this migration yet.