angular.courses

NG update Migrations — Angular 20

Migrations available with the ng update Angular CLI command for Angular 20. 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

document-core

angular20.0.0

Moves imports of `DOCUMENT` from `@angular/common` to `@angular/core`

No example diff available for this migration yet.

inject-flags

angular20.0.0

Replaces usages of the deprecated InjectFlags enum

No example diff available for this migration yet.

previous-style-guide

angular-cli20.0.0

Update workspace generation defaults to maintain previous style guide behavior.

No example diff available for this migration yet.

replace-provide-server-rendering-import

angular-cli20.0.0

Migrate imports of 'provideServerRendering' from '@angular/platform-server' to '@angular/ssr'.

No example diff available for this migration yet.

replace-provide-server-routing

angular-cli20.0.0

Migrate 'provideServerRendering' to use 'withRoutes', and remove 'provideServerRouting' and 'provideServerRoutesConfig' from '@angular/ssr'.

No example diff available for this migration yet.

test-bed-get

angular20.0.0

Replaces usages of the deprecated TestBed.get method with TestBed.inject

No example diff available for this migration yet.

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