Features and Advantages of Angular 8
The Angular community has released its latest version Angular 8 with an impressive list of changes and improvements including the much awaited Ivy compiler as an opt-in feature.
Most prominent features of Angular 8:
Angular 8 supports TypeScript 3.4 and it is required to run your Angular 8 project. So, you have to upgrade your TypeScript version to 3.4. TypeScript 3.4 introduces a new flag called --incremental. The incremental tells TypeScript to save information about the project graph from the last compilation. Every time the TypeScript is invoked with --incremental, it will use that information to detect the least costly way to type-check and emit changes to your project.
Web workers class
Web workers can also be helpful, if your application is unresponsive while processing data.
If you want to outsource such a calculation to a background, we must first create the web worker using the Angular CLI.
Preview of Ivy and Bazel available
After the release of Angular 8, a preview version of Ivy is now available for testing. Ivy is the new rendering engine that produces small bundle size and Bazel is the new build system. Both are ready for proper use with Angular 8. The preview of these two should be available shortly. Ivy is a new compiler/runtime of Angular and Angular 8 is a first release to offer a switch to opt-in into Ivy officially.
To use Ivy in your project, you can instruct the Angular CLI to enable Ivy in your project using the --enable-ivy switch:
Ivy is supposed to be a by default rendering engine in Angular version 9.
Bazel provides one of the newest features of Angular 8 as a possibility to build your CLI application more quickly.
The main advantages of Bazel are:
Angular 8 facilitates you to use standard dynamic import syntax instead of a custom string for lazy-loaded modules.
It means lazy-loaded import that looked like this:
Will be looked like this:
Improvement of ngUpgrade
The Angular CLI is continuously improving. Now, the ng build, ng test and ng run are equipped by 3rd-party libraries and tool. For example, AngularFire already makes use of these new capabilities with a deploy command.