Upgrading Angular 8 to Angular 10

Krishnaraj
2 min readOct 7, 2020

--

Hi folks, I am going share you how to upgrade angular version 8 to 10 through the Angular CLI.

Let us have quick look an what latest in Angular 10.

Angular 10

Key features of Angular 10 thus far include:

  • The addition of dependency information and ng-content selectors to metadata. This proposed compiler feature would provide additional metadata useful for tools such as the Angular Language Service, offering the ability to provide suggestions for directives/components defined in libraries.
  • Propagation of the correct value span in an ExpressionBinding of a microsyntax expression to ParsedProperty, which in turn would propagate the span to the template ASTs (both VE and Ivy). This proposal also is for the compiler.
  • In a fix to the core, logic would be added to undecorated-class migration to decorate derived classes of undecorated classes that use Angular features.
  • In a breaking change, Urlmatcher’s type will reflect that it could always return null.
  • For the service-worker, a fix has been put in for a situation in which there was a chance that the service worker will never register when there is a long-running task or recurring timeout.
  • A number of bug fixes have been made including the compiler avoiding undefined expressions in a holey array and the core avoiding a migration error when a non-existent symbol is imported.

Steps to migrate Angular 8 to Angular 10

First we have migrated angular 8 to angular 9 version

Step 1: ng update @angular/core@8 @angular/cli@8 (Need to update angular 8 latest version)

Step 2: ng update @angular/core@9 @angular/cli@9 — force (From angular 8 to angular 9)

Step 3: ng update @angular/material@9 (Need to update Angular material to 9)

Migrate Angular 9 to Angular 10

Step 4: ng update @angular/core @angular/cli — force (From angular 9 to angular 10)

Step 5: ng update @angular/material (Need to update Angular material to 10)

Conclusion

Congratulations . . . it’s Done , you have migrated your angular project to version 10.

if you have problems yet , you can check it official upgrade guidelines from Angular Update Guide and compare with your project and resolve problems.

Good luck!

--

--