Angular 8

Angular 8 is finally released in May 2019! It’s important to understand what has changed from the previous version so you’ll know how to approach Angular 8 since the support of Angular 7 is available till 2020. Angular 8 has arrived with a bunch of workflow and performance improvements.

Angular Ivy

The angular team is working on Angular Ivy and it isn’t officially released yet. The Angular team has announced that they’re going to be including Ivy in Angular 8 as an opt-in feature. By trying Ivy preview, let you will check that your current Angular application works well or not with Ivy. Ivy is important for the user experience of your Angular application.

JavaScript Loading

Angular 8 apps will be even more faster in loading and performance. New apps created by Angular CLI will now contain separate bundles for legacy JavaScript (ES5) and modern JavaScript (ES2015+) that means the correct bundle will be loaded automatically by the browser that load and render an app faster than before.

Support for Web Workers

Support is improved for bundling web workers with the Angular CLI in Angular 8. It is preferable that the code which runs in the worker can’t be in the same JavaScript file as the rest of your application. It must be separate. This tends to work poorly with tools like the Angular CLI that want to automatically bundle up your JavaScript into as few files as possible. The improvements to Angular CLI’s web worker bundling in Angular 8 will get rid of this awkwardness and set you on the path to fully parallelized web worker happiness.

Support for TypeScript

Angular 8 has arrived with the latest and greatest versions of Angular’s dependencies, which include tools like RxJS and TypeScript. You can manually upgrade to the latest version of TypeScript in your projects. The Angular team is keeping up with everything that TypeScript has to offer and that new apps created using the Angular CLI will also use the newest version of TypeScript by default.

Upgrading from Angular 7 to Angular 8

Upgrading an app from Angular 7 over to Angular 8 is very simple especially if you’ve already migrated over to using the new HttpClient and RxJS 6.

You need to only run a single command to upgrade over to Angular 8:

$ ng update @angular/cli @angular/core

With the above command, your lazy loaded route imports will be migrated to the new import syntax automatically.

Some points to keep in mind about the upgrade process:

· Some new syntax errors might pop out. That’s due to Angular now using TypeScript 3.4, which might surface some issues that were not highlighted before.

· You’ll want to make sure you’re using Node.js version 12 or later. You can check which version of Node you’re using by running

$ node -v

if you need to get the newest version, just head over to the official download page for Node

Upgrading Angular Material

If your app using Angular material, you should follow below command:

$ ng update @angular/material

This command will also take care of changing your Angular Material component imports to each specific component rather than importing from the global @angular/material.

End Notes

Angular 8 running on TypeScript 3.4. It is preferable to check out the highlights to know about the latest changes in the new version of TypeScript.

to know about the latest changes in the new version of TypeScript. If your app uses Angular Material, you should check out the release notes for Angular v8

Stephen Fluin from the Angular team has put together a series of videos that demonstrate the new features in Angular 8.

For more interesting content on Angular framework, you can read our Angular blogs.