So, it has become quite crucial for the developers of Angular to add more features to the framework and fix the bugs. This is why a new version of the Angular framework is being released by developers on a regular basis. The latest version of Angular named Angular 9 was released a few weeks ago.
On a side note, if you’re learning Angular or are managing projects with Angular, check out some of our Angular admin templates. We’re sure you’d love them. That’s all, moving on…
What’s New in Angular 9
The previous versions of Angular contained large bundle files that had a negative effect on user experience, application time, and download time. The latest version of Angular has included Ivy compiler to resolve the issue. Angular 9 version is estimated to reduce the bundle size to around 25 to 40 percent on the basis of app size. In addition to that, the IVY compiler in Angular 9 helps developers by fixing bugs.
The IVY compiler also has several other interesting features to ensure a fine experience for developers when working on complex web app development projects. So, if you have not yet updated to Angular 9 from Angular 8, you are missing out on a lot. Here is a detailed guide on how to update Angular 8 to Angular 9.
Updating Angular 8 to Angular 9
First, you will need to update Angular CLI globally into your system. To do that, you must uninstall the existing Angular CLI packages. Now, proceed to the next step, which is to clear all the cache related issues by running the npm cache verify command. Lastly, you will need to install the Angular CLI version globally. Here is the entire command you will require to do that.
npm uninstall -g angular-cli npm cache clean or npm cache verify (if npm > 5) npm install -g @angular/cli@latest
However, if you are using a linux system or Mac, you will need to add a prefix before the command as given below.
sudo npm uninstall -g angular-cli sudo npm cache clean or sudo npm cache verify (if npm > 5) sudo npm install -g @angular/cli@latest
Now, you will need to update the Angular CLI version in your local project. To do that, navigate to the local Angular project and execute the following command.
ng update @angular/core @angular/cli
The Angular web development project that you are working on may also depend on other Angular libraries. If so, you will need to update them to the latest version too to resolve API incompatibilities if any. You can learn about the outdated libraries in your project by running the npm updated or ng update command within your project.