angular.courses

NG update Migrations — Angular 11

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

abstract-control-parent

angular11.0.0

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`.

No example diff available for this migration yet.

add-declaration-map-compiler-option

angular-cli11.0.0

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

No example diff available for this migration yet.

native-view-encapsulation

angular11.0.0

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

No example diff available for this migration yet.

navigation-extras-omissions

angular11.0.0

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

No example diff available for this migration yet.

replace-ng-packagr-builder

angular-cli11.0.0

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

No example diff available for this migration yet.

router-initial-navigation-options

angular11.0.0

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

No example diff available for this migration yet.

router-preserve-query-params

angular11.0.0

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

No example diff available for this migration yet.

router-relative-link-resolution-default

angular11.0.0

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.

No example diff available for this migration yet.

update-angular-config-v11

angular-cli11.0.0

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

No example diff available for this migration yet.

update-workspace-dependencies-v11

angular-cli11.0.0

Update workspace dependencies to match a new v11 project.

No example diff available for this migration yet.

wait-for-async

angular11.0.0

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

No example diff available for this migration yet.

can-activate-with-redirect-to

angular11.1.0

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

No example diff available for this migration yet.