NG update Migrations
Migrations available with the ng update Angular CLI command.
| Migration | Repository | Description | Introduced | Optional |
|---|---|---|---|---|
| production-by-default | angular-cli | Optional migration to update Angular CLI workspace configurations to 'production' mode by default. | 9999.0.0 | |
| application-config-core | angular | Moves imports of `ApplicationConfig` from `@angular/platform-browser` to `@angular/core` | 21.0.0 | |
| bootstrap-options-migration | angular | Migrates deprecated bootstrap options to providers. | 21.0.0 | |
| router-last-successful-navigation | angular | Ensures that the Router.lastSuccessfulNavigation signal is now invoked | 21.0.0 | |
| update-typescript-lib | angular-cli | Updates the 'lib' property in tsconfig files to use 'es2022' or a more modern version. | 21.0.0 | |
| add-bootstrap-context-to-server-main | angular | Adds `BootstrapContext` to `bootstrapApplication` calls in `main.server.ts` to support server rendering. | 20.3.0 | |
| remove-default-karma-config | angular-cli | Remove any karma configuration files that only contain the default content. The default configuration is automatically available without a specific project file. | 20.2.0 | |
| router-current-navigation | angular | Replaces usages of the deprecated Router.getCurrentNavigation method with the Router.currentNavigation signal | 20.2.0 | Yes |
| control-flow-migration | angular | Converts the entire application to block control flow syntax | 20.0.0 | Yes |
| document-core | angular | Moves imports of `DOCUMENT` from `@angular/common` to `@angular/core` | 20.0.0 | |
| inject-flags | angular | Replaces usages of the deprecated InjectFlags enum | 20.0.0 | |
| previous-style-guide | angular-cli | Update workspace generation defaults to maintain previous style guide behavior. | 20.0.0 | |
| replace-provide-server-rendering-import | angular-cli | Migrate imports of 'provideServerRendering' from '@angular/platform-server' to '@angular/ssr'. | 20.0.0 | |
| replace-provide-server-routing | angular-cli | Migrate 'provideServerRendering' to use 'withRoutes', and remove 'provideServerRouting' and 'provideServerRoutesConfig' from '@angular/ssr'. | 20.0.0 | |
| test-bed-get | angular | Replaces usages of the deprecated TestBed.get method with TestBed.inject | 20.0.0 | |
| update-module-resolution | angular-cli | Update 'moduleResolution' to 'bundler' in TypeScript configurations. You can read more about this, here: https://www.typescriptlang.org/tsconfig/#moduleResolution | 20.0.0 | |
| explicit-standalone-flag | angular | Updates non-standalone Directives, Component and Pipes to 'standalone:false' and removes 'standalone:true' from those who are standalone | 19.0.0 | |
| pending-tasks | angular | Updates ExperimentalPendingTasks to PendingTasks | 19.0.0 | |
| provide-initializer | angular | Replaces `APP_INITIALIZER`, `ENVIRONMENT_INITIALIZER` & `PLATFORM_INITIALIZER` respectively with `provideAppInitializer`, `provideEnvironmentInitializer` & `providePlatformInitializer`. | 19.0.0 | Yes |
| update-ssr-imports | angular-cli | Update '@angular/ssr' import paths to use the new '/node' entry point when 'CommonEngine' is detected. | 19.0.0 | |
| after-render-phase | angular | Updates calls to afterRender with an explicit phase to the new API | 18.1.0 | |
| http-providers | angular | Replace deprecated HTTP related modules with provider functions | 18.0.0 | |
| use-application-builder | angular-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 | 18.0.0 | Yes |
| invalid-two-way-bindings | angular | Updates two-way bindings that have an invalid expression to use the longform expression instead. | 17.3.0 | |
| add-browser-sync-dependency | angular-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'. | 17.1.0 | |
| block-template-entities | angular | Angular v17 introduces a new control flow syntax that uses the @ and } characters. This migration replaces the existing usages with their corresponding HTML entities. | 17.0.0 | |
| compiler-options | angular | CompilerOption.useJit and CompilerOption.missingTranslation are unused under Ivy. This migration removes their usage | 17.0.0 | |
| replace-nguniversal-builders | angular-cli | Replace usages of '@nguniversal/builders' with '@angular-devkit/build-angular'. | 17.0.0 | |
| replace-nguniversal-engines | angular-cli | Replace usages of '@nguniversal/' packages with '@angular/ssr'. | 17.0.0 | |
| transfer-state | angular | Updates `TransferState`, `makeStateKey`, `StateKey` imports from `@angular/platform-browser` to `@angular/core`. | 17.0.0 | |
| guard-and-resolve-interfaces | angular | 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. | 16.0.0 | |
| remove-module-id | angular | As of Angular v16, the `moduleId` property of `@Component` is deprecated as it no longer has any effect. | 16.0.0 | |
| update-server-builder-config | angular-cli | Update the '@angular-devkit/build-angular:server' builder configuration to disable 'buildOptimizer' for non optimized builds. | 16.0.0 | |
| relative-link-resolution | angular | 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. | 15.0.0-beta | |
| remove-browserslist-config | angular-cli | Remove Browserslist configuration files that matches the Angular CLI default configuration. | 15.0.0 | |
| remove-platform-server-exports | angular-cli | Remove exported `@angular/platform-server` `renderModule` method. The `renderModule` method is now exported by the Angular CLI. | 15.0.0 | |
| router-link-with-href | angular | Since Angular v15, the `RouterLink` contains the logic of the `RouterLinkWithHref` directive. This migration replaces all `RouterLinkWithHref` references with `RouterLink`. | 15.0.0-beta | |
| update-karma-main-file | angular-cli | Remove no longer needed require calls in Karma builder main file. | 15.0.0 | |
| update-typescript-target | angular-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. | 15.0.0 | |
| update-workspace-config | angular-cli | Remove options from 'angular.json' that are no longer supported by the official builders. | 15.0.0 | |
| path-match-type | angular | 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`. | 14.0.0-beta | |
| remove-default-project-option | angular-cli | Remove 'defaultProject' option from workspace configuration. The project to use will be determined from the current working directory. | 14.0.0 | |
| remove-show-circular-dependencies-option | angular-cli | Remove 'showCircularDependencies' option from browser and server builders. | 14.0.0 | |
| replace-default-collection-option | angular-cli | Replace 'defaultCollection' option in workspace configuration with 'schematicCollections'. | 14.0.0 | |
| typed-forms | angular | As of Angular version 14, Forms model classes accept a type parameter, and existing usages must be opted out to preserve backwards-compatibility. | 14.0.0-beta | |
| update-angular-packages-version-prefix | angular-cli | Update Angular packages 'dependencies' and 'devDependencies' version prefix to '^' instead of '~'. | 14.0.0 | |
| update-libraries-secondary-entrypoints | angular-cli | Remove 'package.json' files from library projects secondary entrypoints. | 14.0.0 | |
| update-tsconfig-target | angular-cli | Update TypeScript compilation target to 'ES2020'. | 14.0.0 | |
| entry-components | angular | As of Angular version 13, `entryComponents` are no longer necessary. | 13.1.0-beta | |
| drop-ie-polyfills | angular-cli | Remove polyfills required only for Internet Explorer which is no longer supported. | 13.0.0 | |
| router-link-empty-expression | angular | Migrates `[routerLink]=""` in templates to `[routerLink]="[]"` because these links are likely intended to route to the current page with updated fragment/query params. | 13.0.0-beta | |
| schematic-options-13 | angular-cli | Remove no longer valid Angular schematic options from `angular.json`. | 13.0.0 | |
| testbed-teardown | angular | 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. | 13.0.0-beta | |
| update-angular-config-v13 | angular-cli | Remove deprecated options from 'angular.json' that are no longer present in v13. | 13.0.0 | |
| update-gitignore | angular-cli | Updating '.gitignore' to include '.angular/cache'. | 13.0.0 | |
| update-libraries-v13 | angular-cli | Update library projects to be published in partial mode and removed deprecated options from ng-packagr configuration. | 13.0.0 | |
| replace-deprecated-prod-flag | angular-cli | Replace the deprecated '--prod' in package.json scripts. | 12.1.0 | |
| deep-shadow-piercing-selector | angular | Automatically migrates shadow-piercing selector from `/deep/` to the recommanded alternative `::ng-deep`. | 12.0.2 | |
| schematic-options-12 | angular-cli | Remove invalid 'skipTests' option in '@schematics/angular:module' Angular schematic options. | 12.0.1 | |
| remove-deprecated-i18n-options | angular-cli | Remove deprecated ViewEngine-based i18n build and extract options. Options present in the configuration will be converted to use non-deprecated options. | 12.0.0-next.7 | |
| update-web-workers-webpack-5 | angular-cli | Updates Web Worker consumer usage to use the new syntax supported directly by Webpack 5. | 12.0.0-next.7 | |
| xhr-factory | angular | `XhrFactory` has been moved from `@angular/common/http` to `@angular/common`. | 12.0.0-next.6 | |
| lazy-loading-string-syntax | angular-cli | Lazy loading syntax migration. Update lazy loading string syntax to use dynamic imports. | 12.0.0-next.4 | |
| remove-emit-decorator-metadata | angular-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 | 12.0.0-next.2 | |
| update-zonejs | angular-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 | 12.0.0-next.1 | |
| activated-route-snapshot-fragment | angular | In Angular version 12, the type of ActivatedRouteSnapshot.fragment is nullable. This migration automatically adds non-null assertions to it. | 12.0.0-beta | |
| update-angular-config-v12 | angular-cli | Remove deprecated options from 'angular.json' that are no longer present in v12. | 12.0.0-next.0 | |
| can-activate-with-redirect-to | angular | Removes `canActivate` from a `Route` config when `redirectTo` is also present | 11.1.0-beta | |
| update-angular-config-v11 | angular-cli | Remove deprecated options from 'angular.json' that are no longer present in v11. | 11.0.0-next.8 | |
| add-declaration-map-compiler-option | angular-cli | Add 'declarationMap' compiler options for non production library builds. | 11.0.0-next.2 | |
| abstract-control-parent | angular | 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`. | 11.0.0-beta | |
| native-view-encapsulation | angular | ViewEncapsulation.Native has been removed as of Angular version 11. This migration replaces any usages with ViewEncapsulation.ShadowDom. | 11.0.0-beta | |
| navigation-extras-omissions | angular | NavigationExtras omissions migration. In version 11, some unsupported properties were omitted from the `extras` parameter of the `Router.navigateByUrl` and `Router.createUrlTree` methods. | 11.0.0-beta | |
| replace-ng-packagr-builder | angular-cli | Replace deprecated library builder '@angular-devkit/build-ng-packagr'. | 11.0.0-next.0 | |
| router-initial-navigation-options | angular | Updates the `initialNavigation` property for `RouterModule.forRoot`. | 11.0.0-beta | |
| router-preserve-query-params | angular | NavigationExtras.preserveQueryParams has been removed as of Angular version 11. This migration replaces any usages with the appropriate assignment of the queryParamsHandler key. | 11.0.0-beta | |
| router-relative-link-resolution-default | angular | 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. | 11.0.0-beta | |
| update-workspace-dependencies-v11 | angular-cli | Update workspace dependencies to match a new v11 project. | 11.0.0 | |
| wait-for-async | angular | `async` to `waitForAsync` migration. The `async` testing function has been renamed to `waitForAsync` to avoid confusion with the native `async` keyword. | 11.0.0-beta | |
| remove-solution-style-tsconfig | angular-cli | Removing "Solution Style" TypeScript configuration file support. | 10.1.0-next.5 | |
| update-module-and-target-compiler-options | angular-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 | 10.0.1 | |
| tslint-add-deprecation-rule | angular-cli | Add the tslint deprecation rule to tslint JSON configuration files. | 10.0.0-beta.7 | |
| update-libraries-tslib | angular-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 | 10.0.0-beta.7 | |
| update-angular-config | angular-cli | Remove deprecated options from 'angular.json' that are no longer present in v10. | 10.0.0-beta.6 | |
| remove-es5-browser-support-option | angular-cli | Remove deprecated 'es5BrowserSupport' browser builder option. The inclusion for ES5 polyfills will be determined from the browsers listed in the browserslist configuration. | 10.0.0-beta.2 | |
| schematic-options-10 | angular-cli | Replace deprecated and removed 'styleext' and 'spec' Angular schematic options with 'style' and 'skipTests', respectively. | 10.0.0-beta.2 | |
| update-workspace-dependencies | angular-cli | Update workspace dependencies to match a new v10 project. | 10.0.0-rc.2 | |
| rename-browserslist-config | angular-cli | Update Browserslist configuration file name to '.browserslistrc' from deprecated 'browserslist'. | 10.0.0-beta.0 | |
| tslint-version-6 | angular-cli | Update tslint to version 6 and adjust rules to maintain existing behavior. | 10.0.0-beta.0 | |
| schematic-options-9 | angular-cli | Replace deprecated 'styleext' and 'spec' Angular schematic options. | 9.0.2 | |
| lazy-loading-syntax | angular-cli | Lazy loading syntax migration. Update lazy loading syntax to use dynamic imports. | 9.0.0-next.6 | |
| dynamic-queries | angular | 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 | 9-beta | |
| missing-injectable | angular | 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 | 9.0.0-beta | |
| module-with-providers | angular | 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 | 9.0.0-beta | |
| renderer-to-renderer2 | angular | Migrates usages of Renderer to Renderer2 | 9-beta | |
| undecorated-classes-with-decorated-fields | angular | 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 | 9.0.0-beta | |
| undecorated-classes-with-di | angular | 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 | 9.0.0-beta | |
| workspace-version-9 | angular-cli | Angular Workspace migration. Update an Angular CLI workspace to version 9. | 9.0.0-beta.0 | |
| move-document | angular | Migrates DOCUMENT Injection token from platform-browser imports to common import | 8-beta | |
| static-queries | angular | Migrates ViewChild and ContentChild to explicit query timing | 8-beta | |
| template-local-variables | angular | Warns developers if values are assigned to template variables | 8-beta |