UPDATE
From
To
Migrating across multiple major versions at once is not supported. Please migrate each major version individually.
There is no support for downgrading versions of Angular.
Before updating your Angular, Let's explore Angular 13, what's new and what's changed! to understand Angular 13 comprehensively.
RxJS v7.4 is now the default for apps created with Angular v13. Any project using RxJS v6.x can be updated manually by using the command:
npm install rxjs@7.4
Support for TypeScript 4.6 is added in Angular 14. Get started with TypeScript 4.6 through NuGet or use npm with the commands:
npm install -g typescript@4.6
Save your work to git repository. It's a good practice to save a copy of your project separately if you don't have a git repository.
Check Repository is not clean. Please commit or stash any changes before updating ? if you need any assistance.
An angular application can be updated to latest version in two ways. It's just a matter of convenience there's no deep meaning or technical variation of end results between the two types.
The following guide provides a step-by-step procedure to migrate from Angular v12 to Angular v13 using the npx. If you have multiple projects but you intend to deal with a specific project then it doesn't make sense to update the global environment. This step is apt for you as it helps you update only your specific application with minimal global traces.
1. Run the following command inside your application, which should bring it to Angular v13
npx @angular/cli@13 update @angular/core@13 @angular/cli@13
2. If Angular Material is used in the project it can be updated to version 13 using the following command
npx @angular/cli@13 update @angular/material@13
The following guide provides a step-by-step procedure to migrate from Angular v12 to Angular v13 using the npm. If you have only one project (or) if you have multiple projects but you intend to migrate them all then this guide is apt for you.
1. Make sure node_modules is present inside your application. The command to get node_modules inside your project is npm install (or) npm i
2. Running the following command inside your project will bring it to version 13 of Angular
ng update @angular/core@13 @angular/cli@13
4. If Angular Material is used in the application it can be updated using the following command
npx @angular/cli@13 update @angular/material@13
ng update
The above command will take care of
After the execution of the command, the terminal will display the entities that still need to be updated along with corresponding commands to update them. It will only be displayed if something needs to be updated.
Navigation
Deprecations in SwUpdate
AbstractControl
Testing
Hence, tests that rely on location.go need to use simulateHashChange to capture popstate.