Angular 8 New Features

0
3384
views

Angular 8 New Features : Angular 8 is out now with its improvements in workflow and performances. Angular team is keep on updating Angular with new features, performance measures, etc., making Angular much more stable framework to work with.

Let’s go and look into what are the new features in angular and how do we upgrade our application to Angular 8

Angular 8 New Features

Differential loading

Differential loading concept in Angular 8 will significantly improve performance of the application and different bundles created supports older browser versions.

Differential loading creates two bundles when we are building our application for production: one bundle for modern browsers that support ES2015+ and another bundle for older browsers that only support the ES5 version of JavaScript. The correct bundle will be loaded automatically by the browser.

This new feature improves the performance for Angular v8 applications significantly. Now newer browsers will load less code and less amount of polyfills.

You can avail this benefit from differential loading, just by running ng build command with the --prod flag.

Dynamic imports for lazy routes

You can now lazy load the routes using standard ES6 import syntax instead of using a custom string. Even if you misspell now Typescript and linters can easily complain you.

Now our Lazy loaded routes looks like this

{ path: `/cart`, loadChildren: () => import(`./cart/cart.module`).then(m => m.CartModule) }

If you use the Angular CLI command ng upgrade this syntax will be automatically taken care.

CLI workflow improvements

The Angular CLI continues to improve, and now the ng build, ng test and ng run are now supported by 3rd-party libraries and tool. For example, AngularFire already makes use of these new capabilities with a deploy command.

What about Ivy and Bazel?

Angular is still not ready for Ivy(rendering engine),and Bazel(new build system),These features might be available in the next releases.

You can upgrade your projects to Angular 8 using

ng update @angular/cli @angular/core

You can even upgrade Angular Material to version 8 using

ng update @angular/material

Angular 8 New Features