How To Upgrade To Angular 9? - Appventurez
CONTACT

How To Upgrade To Angular 9?

Anand Prakash By Anand Prakash | February 13, 2020
angular version 9 upgrade

Angular 9 is launched and has come up as a treat for the developers. The latest upgrade includes some exciting features of Angular in terms of ivy that was released on 7th February 2020.

The Angular 9 all-new features are more than enough to keep the audience hooked and work efficiently in the Angular ecosystem. The shaking features are able to save size in terms of large bundles and there are small improvements for developers. 

Developers are all set to update the CLI version to the latest Angular 9 that is a lot easier. The ng update command has made it easy for developers to update to dependencies and specific versions. 

Read more: Introduction to Angular

What Is ng Update Command?

This command is used to update the application along with its dependencies in Angular CLI. With the help of this command, it is easy to update different package.json files. To do so, the –all option is used that takes false or true or even –package option for specific Angular version

How To Update Angular To Version 9?

In order to update Angular to version, the @angualr/core and @angular/cli must be updated to the latest version. 

ng update @angular/[email protected] @angular/[email protected] –force

Then start the code to get Angular 9 update easily.

ng update @angular/cli @angular/core –next

The pre-release version is new as compared to the Angular CLI version. Hence, install a temporary version to ensure that updates perform in a better way. 

Use yarn to install the package, use ‘yarn’ for the package manager. In the end, collect installed dependencies to finalize the update. 

Once done, start the local machine and open the app. Make sure to keep an eye on any error that might pop up. Start with pull request and production deploy to get started with the build process. 

Or you can follow the GitHub approach for v7 to v9 as mentioned below:

1. Use GitHub To Clone The Project

In the GitHub repository, clone Angular 7 and run the command

$ git clone https://github.com/techiediaries/angular-portfolio

Once done, navigate it to the folder and use:

$ cd angular-portfolio$ npm install

2. Identify The Angular Version Used In The Projects

Then follow the command

$ ng version

An output will pop up showing the details of its packages and versions including CLI v7.1.4 and local versions installed in the system.

3. Follow The Upgrade Process

Follow Up the upgrade process with the help of the Angular Update Guide to specifying the update to v9. Tap on the Show me how to update and move to v9 from v7.

Select the project, in case of a warning, move to v8 instead of 9 to avoid multiple version jump. Start with the upgrade of the project.

4. Update It To v8

It is best to make sure that Node 10 is used to improve type checking. Use the command-line

$ ng update

This will help in analyzing package.json and a list of packages will pop up as the outcome.

Start with the core framework update to v8.2.14 or v8.3.19 with the help of

$ ng update @angular/cli @angular/core

You will be updated successfully to Angular 9 from CLI. after this, use the command

$ ng –version

This will send out the outcome of different packages that are installed successfully in the system.However, if you are using any low version then make sure to go one step at a time and update any version to Angular version 9.

5. Follow It With Pre-Release Of Angular 9 Version

After this is done, update to Angular 9 with the help of the command line:

Using package manager: ‘npm’Collecting installed dependencies…Found 32 dependencies.We analyzed your package.json and everything seems to be in order. Good work!

This is due to the pre-release version of 9 and to get it to use the command:

$ ng update –next

As a rest, you will get the version of @angular/cli and @angular/core. Follow it up with the command

$ ng update @angular/cli @angular/core –next

It is possible to get an error after this, due to unclean repository so make sure to stash it up and use flag to proceed forward.

$ ng update @angular/cli @angular/core –next –allow-dirty

This will update the app to Angular 9 successfully. 

6. Serve The App

Now, since the app is upgraded to the latest version make sure to check its working with:

$ ng serve

Make sure to follow the guidelines to ensure that they work in a smooth manner. If you are not careful then it is possible that the update will not work properly. 

Anand Prakash
Anand Prakash

Co-Founder and AVP Technology at Appventurez Mobitech. A tech enthusiast who has broad expertise in delivering end to end software solutions. He is an expert technocrat ho has in-depth knowledge and is highly experienced in delivering solutions for Android, Xamarin, Ethereum Smart Contracts, ASP.net.

⚡️ by Appventurez

Leave a Reply

Please rate*

Your email address will not be published.

Hey there! This is Anand, author of this blog. Leave your email address and we'll keep you posted on what we're up to.

This will subscribe you to Appventurez once-a-month newsletter. You can unsubscribe anytime. And we promise not to pester you or share your data :)

Hey there, wondering where this article came from? It was produced by some people at Appventurez, a Mobile & Web App Development Company. We are here for solutioning of your technological needs.

Our Latest Blog

shape your ecommerce with augmented reality just like gucci
GUCCI's AR Sneakers: How You Can Also Shape Your Ecommerce With Augmented Reality?

In the competitive tech world, retail firms & eCommerce business owners are...

Read more
why is it the right time to invest in ott app development
Why Is It The Right Time To Invest In OTT App Development?

Over 70% of the US residents are active subscribers to at least one popular OTT...

Read more
How Buy Now Pay Later Apps Are Expanding Their Coverage In The US Market?

In the financial sector, buy now pay later(BNPL) has become a hot topic. In Jan...

Read more

We’re your neighbor

Appventurez is a well known mobile app development company in the USA and India that works to build strong, long-lasting relations with its clients in different locations.

india flag appventurez
India (HQ)

Logix Infotech Park, 1st Floor, Plot No. D-5, Sector 59, Noida, Uttar Pradesh 201301

Inquiries : +91-9899 650980

5 Taunton Place Craigieburn VIC Australia

Inquiries : +1-815-283-8355

Office #216 Regus Tower Bank Street, Doha Qatar

Inquiries : +974-33497259

usa flag appventurez
USA

12501 W Chandler Blvd, Suite 200 Valley Village, CA 91607 USA

Inquiries : +1-888-822-1022

Rimal 5 Jumeirah Beach Residence 2 Dubai

Inquiries : +1-815-283-8355

south africa flag appventurez
South Africa

3 monterrey Complex, 63 Montrose Avenue, Northgate, Johannesburg, 2191

Inquiries : +27 737 810 945

7 Hanover House, Chapel Street, Bradford BD1 5DQ, United Kingdom

Inquiries : +1-815-283-8355

Netherlands flag appventurez
Netherlands

Amstelveen, Netherlands

Inquiries : +31-(0)-61-020-9692

Calle Ambar 2711, Av Victoria, 45089, Zapopan, Jalisco, Mexico

Inquiries : +521 332 393 9998

ghana flag appventurez
Ghana

North Industrial Area, Otublohum Road, Opposite Melcom Plus, Accra, Ghana

Inquiries : +27 737 810 945

appventurez worldwide presence
india flag appventurez
India (HQ)

Logix Infotech Park, 1st Floor, Plot No. D-5, Sector 59, Noida, Uttar Pradesh 201301

Inquiries : +91-9899 650980

5 Taunton Place Craigieburn VIC Australia

Inquiries : +1-815-283-8355

Office #216 Regus Tower Bank Street, Doha Qatar

Inquiries : +974-33497259

usa flag appventurez
USA

12501 W Chandler Blvd, Suite 200 Valley Village, CA 91607 USA

Inquiries : +1-888-822-1022

Rimal 5 Jumeirah Beach Residence 2 Dubai

Inquiries : +1-815-283-8355

south africa flag appventurez
South Africa

3 monterrey Complex, 63 Montrose Avenue, Northgate, Johannesburg, 2191

Inquiries : +27 737 810 945

7 Hanover House, Chapel Street, Bradford BD1 5DQ, United Kingdom

Inquiries : +1-815-283-8355

Netherlands flag appventurez
Netherlands

Amstelveen, Netherlands

Inquiries : +31-(0)-61-020-9692

Calle Ambar 2711, Av Victoria, 45089, Zapopan, Jalisco, Mexico

Inquiries : +521 332 393 9998

ghana flag appventurez
Ghana

North Industrial Area, Otublohum Road, Opposite Melcom Plus, Accra, Ghana

Inquiries : +27 737 810 945

10 Global Offices

Across 124 territories and 33.6k global workspace

700+ Worldwide clients

Largest International clients

24 x 7 Availability

Effective support, anytime