angular.courses

NG update Migrations

Migrations available with the ng update Angular CLI command.

View details and example diffs by version: 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8

application-config-coreangular

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

Introduced: 21.0.0
bootstrap-options-migrationangular

Migrates deprecated bootstrap options to providers.

Introduced: 21.0.0
router-last-successful-navigationangular

Ensures that the Router.lastSuccessfulNavigation signal is now invoked

Introduced: 21.0.0
update-typescript-libangular-cli

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

Introduced: 21.0.0
add-bootstrap-context-to-server-mainangular

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

Introduced: 20.3.0
remove-default-karma-configangular-cli

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

Introduced: 20.2.0
router-current-navigationangular

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

Introduced: 20.2.0Optional
control-flow-migrationangular

Converts the entire application to block control flow syntax

Introduced: 20.0.0Optional
document-coreangular

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

Introduced: 20.0.0
inject-flagsangular

Replaces usages of the deprecated InjectFlags enum

Introduced: 20.0.0
previous-style-guideangular-cli

Update workspace generation defaults to maintain previous style guide behavior.

Introduced: 20.0.0
replace-provide-server-rendering-importangular-cli

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

Introduced: 20.0.0
replace-provide-server-routingangular-cli

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

Introduced: 20.0.0
test-bed-getangular

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

Introduced: 20.0.0
update-module-resolutionangular-cli

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

Introduced: 20.0.0
explicit-standalone-flagangular

Updates non-standalone Directives, Component and Pipes to 'standalone:false' and removes 'standalone:true' from those who are standalone

Introduced: 19.0.0
pending-tasksangular

Updates ExperimentalPendingTasks to PendingTasks

Introduced: 19.0.0
provide-initializerangular

Replaces `APP_INITIALIZER`, `ENVIRONMENT_INITIALIZER` & `PLATFORM_INITIALIZER` respectively with `provideAppInitializer`, `provideEnvironmentInitializer` & `providePlatformInitializer`.

Introduced: 19.0.0Optional
update-ssr-importsangular-cli

Update '@angular/ssr' import paths to use the new '/node' entry point when 'CommonEngine' is detected.

Introduced: 19.0.0
after-render-phaseangular

Updates calls to afterRender with an explicit phase to the new API

Introduced: 18.1.0
http-providersangular

Replace deprecated HTTP related modules with provider functions

Introduced: 18.0.0
use-application-builderangular-cli

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

Introduced: 18.0.0Optional
invalid-two-way-bindingsangular

Updates two-way bindings that have an invalid expression to use the longform expression instead.

Introduced: 17.3.0
add-browser-sync-dependencyangular-cli

Add 'browser-sync' as dev dependency when '@angular-devkit/build-angular:ssr-dev-server' is used, as it is no longer a direct dependency of '@angular-devkit/build-angular'.

Introduced: 17.1.0
block-template-entitiesangular

Angular v17 introduces a new control flow syntax that uses the @ and } characters. This migration replaces the existing usages with their corresponding HTML entities.

Introduced: 17.0.0
compiler-optionsangular

CompilerOption.useJit and CompilerOption.missingTranslation are unused under Ivy. This migration removes their usage

Introduced: 17.0.0
replace-nguniversal-buildersangular-cli

Replace usages of '@nguniversal/builders' with '@angular-devkit/build-angular'.

Introduced: 17.0.0
replace-nguniversal-enginesangular-cli

Replace usages of '@nguniversal/' packages with '@angular/ssr'.

Introduced: 17.0.0
transfer-stateangular

Updates `TransferState`, `makeStateKey`, `StateKey` imports from `@angular/platform-browser` to `@angular/core`.

Introduced: 17.0.0
guard-and-resolve-interfacesangular

In Angular version 15.2, the guard and resolver interfaces (CanActivate, Resolve, etc) were deprecated. This migration removes imports and 'implements' clauses that contain them.

Introduced: 16.0.0
remove-module-idangular

As of Angular v16, the `moduleId` property of `@Component` is deprecated as it no longer has any effect.

Introduced: 16.0.0
update-server-builder-configangular-cli

Update the '@angular-devkit/build-angular:server' builder configuration to disable 'buildOptimizer' for non optimized builds.

Introduced: 16.0.0
relative-link-resolutionangular

In Angular version 15, the deprecated `relativeLinkResolution` config parameter of the Router is removed. This migration removes all `relativeLinkResolution` fields from the Router config objects.

Introduced: 15.0.0
remove-browserslist-configangular-cli

Remove Browserslist configuration files that matches the Angular CLI default configuration.

Introduced: 15.0.0
remove-platform-server-exportsangular-cli

Remove exported `@angular/platform-server` `renderModule` method. The `renderModule` method is now exported by the Angular CLI.

Introduced: 15.0.0
router-link-with-hrefangular

Since Angular v15, the `RouterLink` contains the logic of the `RouterLinkWithHref` directive. This migration replaces all `RouterLinkWithHref` references with `RouterLink`.

Introduced: 15.0.0
update-karma-main-fileangular-cli

Remove no longer needed require calls in Karma builder main file.

Introduced: 15.0.0
update-typescript-targetangular-cli

Update TypeScript compiler `target` and set `useDefineForClassFields`. These changes are for IDE purposes as TypeScript compiler options `target` and `useDefineForClassFields` are set to `ES2022` and `false` respectively by the Angular CLI. To control ECMA version and features use the Browerslist configuration.

Introduced: 15.0.0
update-workspace-configangular-cli

Remove options from 'angular.json' that are no longer supported by the official builders.

Introduced: 15.0.0
path-match-typeangular

In Angular version 14, the `pathMatch` property of `Routes` was updated to be a strict union of the two valid options: `'full'|'prefix'`. `Routes` and `Route` variables need an explicit type so TypeScript does not infer the property as the looser `string`.

Introduced: 14.0.0
remove-default-project-optionangular-cli

Remove 'defaultProject' option from workspace configuration. The project to use will be determined from the current working directory.

Introduced: 14.0.0
remove-show-circular-dependencies-optionangular-cli

Remove 'showCircularDependencies' option from browser and server builders.

Introduced: 14.0.0
replace-default-collection-optionangular-cli

Replace 'defaultCollection' option in workspace configuration with 'schematicCollections'.

Introduced: 14.0.0
typed-formsangular

As of Angular version 14, Forms model classes accept a type parameter, and existing usages must be opted out to preserve backwards-compatibility.

Introduced: 14.0.0
update-angular-packages-version-prefixangular-cli

Update Angular packages 'dependencies' and 'devDependencies' version prefix to '^' instead of '~'.

Introduced: 14.0.0
update-libraries-secondary-entrypointsangular-cli

Remove 'package.json' files from library projects secondary entrypoints.

Introduced: 14.0.0
update-tsconfig-targetangular-cli

Update TypeScript compilation target to 'ES2020'.

Introduced: 14.0.0
entry-componentsangular

As of Angular version 13, `entryComponents` are no longer necessary.

Introduced: 13.1.0
drop-ie-polyfillsangular-cli

Remove polyfills required only for Internet Explorer which is no longer supported.

Introduced: 13.0.0
router-link-empty-expressionangular

Migrates `[routerLink]=""` in templates to `[routerLink]="[]"` because these links are likely intended to route to the current page with updated fragment/query params.

Introduced: 13.0.0
schematic-options-13angular-cli

Remove no longer valid Angular schematic options from `angular.json`.

Introduced: 13.0.0
testbed-teardownangular

In Angular version 13, the `teardown` flag in `TestBed` will be enabled by default. This migration automatically opts out existing apps from the new teardown behavior.

Introduced: 13.0.0
update-angular-config-v13angular-cli

Remove deprecated options from 'angular.json' that are no longer present in v13.

Introduced: 13.0.0
update-gitignoreangular-cli

Updating '.gitignore' to include '.angular/cache'.

Introduced: 13.0.0
update-libraries-v13angular-cli

Update library projects to be published in partial mode and removed deprecated options from ng-packagr configuration.

Introduced: 13.0.0
replace-deprecated-prod-flagangular-cli

Replace the deprecated '--prod' in package.json scripts.

Introduced: 12.1.0
deep-shadow-piercing-selectorangular

Automatically migrates shadow-piercing selector from `/deep/` to the recommanded alternative `::ng-deep`.

Introduced: 12.0.2
schematic-options-12angular-cli

Remove invalid 'skipTests' option in '@schematics/angular:module' Angular schematic options.

Introduced: 12.0.1
activated-route-snapshot-fragmentangular

In Angular version 12, the type of ActivatedRouteSnapshot.fragment is nullable. This migration automatically adds non-null assertions to it.

Introduced: 12.0.0
lazy-loading-string-syntaxangular-cli

Lazy loading syntax migration. Update lazy loading string syntax to use dynamic imports.

Introduced: 12.0.0
remove-deprecated-i18n-optionsangular-cli

Remove deprecated ViewEngine-based i18n build and extract options. Options present in the configuration will be converted to use non-deprecated options.

Introduced: 12.0.0
remove-emit-decorator-metadataangular-cli

Remove 'emitDecoratorMetadata' TypeScript compiler option. Decorator metadata is no longer needed by Angular. Read more about this here: https://www.typescriptlang.org/docs/handbook/decorators.html#metadata

Introduced: 12.0.0
update-angular-config-v12angular-cli

Remove deprecated options from 'angular.json' that are no longer present in v12.

Introduced: 12.0.0
update-web-workers-webpack-5angular-cli

Updates Web Worker consumer usage to use the new syntax supported directly by Webpack 5.

Introduced: 12.0.0
update-zonejsangular-cli

Update 'zone.js' to version 0.11.x. Read more about this here: https://github.com/angular/angular/blob/master/packages/zone.js/CHANGELOG.md#breaking-changes-since-zonejs-v0111

Introduced: 12.0.0
xhr-factoryangular

`XhrFactory` has been moved from `@angular/common/http` to `@angular/common`.

Introduced: 12.0.0
can-activate-with-redirect-toangular

Removes `canActivate` from a `Route` config when `redirectTo` is also present

Introduced: 11.1.0
abstract-control-parentangular

In Angular version 11, the type of `AbstractControl.parent` can be `null` to reflect the runtime value more accurately. This migration automatically adds non-null assertions to existing accesses of the `parent` property on types like `FormControl`, `FormArray` and `FormGroup`.

Introduced: 11.0.0
add-declaration-map-compiler-optionangular-cli

Add 'declarationMap' compiler options for non production library builds.

Introduced: 11.0.0
native-view-encapsulationangular

ViewEncapsulation.Native has been removed as of Angular version 11. This migration replaces any usages with ViewEncapsulation.ShadowDom.

Introduced: 11.0.0
navigation-extras-omissionsangular

NavigationExtras omissions migration. In version 11, some unsupported properties were omitted from the `extras` parameter of the `Router.navigateByUrl` and `Router.createUrlTree` methods.

Introduced: 11.0.0
replace-ng-packagr-builderangular-cli

Replace deprecated library builder '@angular-devkit/build-ng-packagr'.

Introduced: 11.0.0
router-initial-navigation-optionsangular

Updates the `initialNavigation` property for `RouterModule.forRoot`.

Introduced: 11.0.0
router-preserve-query-paramsangular

NavigationExtras.preserveQueryParams has been removed as of Angular version 11. This migration replaces any usages with the appropriate assignment of the queryParamsHandler key.

Introduced: 11.0.0
router-relative-link-resolution-defaultangular

The default value for `relativeLinkResolution` is changing from 'legacy' to 'corrected'. This migration updates `RouterModule` configurations that use the default value to now specifically use 'legacy' to prevent breakages when updating.

Introduced: 11.0.0
update-angular-config-v11angular-cli

Remove deprecated options from 'angular.json' that are no longer present in v11.

Introduced: 11.0.0
update-workspace-dependencies-v11angular-cli

Update workspace dependencies to match a new v11 project.

Introduced: 11.0.0
wait-for-asyncangular

`async` to `waitForAsync` migration. The `async` testing function has been renamed to `waitForAsync` to avoid confusion with the native `async` keyword.

Introduced: 11.0.0
remove-solution-style-tsconfigangular-cli

Removing "Solution Style" TypeScript configuration file support.

Introduced: 10.1.0
update-module-and-target-compiler-optionsangular-cli

Update 'module' and 'target' TypeScript compiler options. Read more about this here: https://v10.angular.io/guide/migration-update-module-and-target-compiler-options

Introduced: 10.0.1
remove-es5-browser-support-optionangular-cli

Remove deprecated 'es5BrowserSupport' browser builder option. The inclusion for ES5 polyfills will be determined from the browsers listed in the browserslist configuration.

Introduced: 10.0.0
rename-browserslist-configangular-cli

Update Browserslist configuration file name to '.browserslistrc' from deprecated 'browserslist'.

Introduced: 10.0.0
schematic-options-10angular-cli

Replace deprecated and removed 'styleext' and 'spec' Angular schematic options with 'style' and 'skipTests', respectively.

Introduced: 10.0.0
tslint-add-deprecation-ruleangular-cli

Add the tslint deprecation rule to tslint JSON configuration files.

Introduced: 10.0.0
tslint-version-6angular-cli

Update tslint to version 6 and adjust rules to maintain existing behavior.

Introduced: 10.0.0
update-angular-configangular-cli

Remove deprecated options from 'angular.json' that are no longer present in v10.

Introduced: 10.0.0
update-libraries-tslibangular-cli

Update library projects to use tslib version 2 as a direct dependency. Read more about this here: https://v10.angular.io/guide/migration-update-libraries-tslib

Introduced: 10.0.0
update-workspace-dependenciesangular-cli

Update workspace dependencies to match a new v10 project.

Introduced: 10.0.0
schematic-options-9angular-cli

Replace deprecated 'styleext' and 'spec' Angular schematic options.

Introduced: 9.0.2
dynamic-queriesangular

Static flag migration. Removes the `static` flag from dynamic queries. As of Angular 9, the "static" flag defaults to false and is no longer required for your view and content queries. Read more about this here: https://v9.angular.io/guide/migration-dynamic-flag

Introduced: 9.0.0
lazy-loading-syntaxangular-cli

Lazy loading syntax migration. Update lazy loading syntax to use dynamic imports.

Introduced: 9.0.0
missing-injectableangular

Missing @Injectable and incomplete provider definition migration. In Angular 9, enforcement of @Injectable decorators for DI is a bit stricter and incomplete provider definitions behave differently. Read more about this here: https://v9.angular.io/guide/migration-injectable

Introduced: 9.0.0
module-with-providersangular

ModuleWithProviders migration. In Angular 9, the ModuleWithProviders type without a generic has been deprecated. This migration adds the generic where it is missing. Read more about this here: https://v9.angular.io/guide/migration-module-with-providers

Introduced: 9.0.0
renderer-to-renderer2angular

Migrates usages of Renderer to Renderer2

Introduced: 9.0.0
undecorated-classes-with-decorated-fieldsangular

Undecorated classes with decorated fields migration. As of Angular 9, it is no longer supported to have Angular field decorators on a class that does not have an Angular decorator. Read more about this here: https://v9.angular.io/guide/migration-undecorated-classes

Introduced: 9.0.0
undecorated-classes-with-diangular

Undecorated classes with DI migration. As of Angular 9, it is no longer supported to use Angular DI on a class that does not have an Angular decorator. Read more about this here: https://v9.angular.io/guide/migration-undecorated-classes

Introduced: 9.0.0
workspace-version-9angular-cli

Angular Workspace migration. Update an Angular CLI workspace to version 9.

Introduced: 9.0.0
move-documentangular

Migrates DOCUMENT Injection token from platform-browser imports to common import

Introduced: 8.0.0
static-queriesangular

Migrates ViewChild and ContentChild to explicit query timing

Introduced: 8.0.0
template-local-variablesangular

Warns developers if values are assigned to template variables

Introduced: 8.0.0
production-by-defaultangular-cli

Optional migration to update Angular CLI workspace configurations to 'production' mode by default.

Introduced: