Home >>Angular8 Tutorial >Angular8 Features
The Angular community has released its latest version of Angular 8 with an exciting list of changes and improvements including the much awated Ivy compiler as an opt-in option.
Most prominent features of Angular 8:
Angular 8 supports TypeScript 3.4, and your Angular 8 project is required to run. So, you must upgrade your version of TypeScript to 3.4. TypeScript 3.4 presents a new flag called —incremental. The incremental tells TypeScript to save from the last compilation details regarding the project graph. That time you invoke the TypeScript with —incremental, it will use the information to detect the least expensive way to type-check and emit changes to your project.
JavaScript is a single thread so asynchronous occurrence is common for more critical tasks such as data calls. Web Workers enables the execution of intensive CPU computations in the background thread, freeing up the main thread to update the user interface.
If your application is unresponsive while processing data, web workers may also be helpful.
If you want to outsource such a calculation to a background, we must first use the Angular CLI to create the Web worker.
A preview version of Ivy is available for testing now after the release of Angular 8. Ivy is the new rendering engine producing the small bundle size and Bazel is the new building system. With Angular 8 both are ready for proper use. The preview of these two is due to be available soon. Ivy is the latest Angular compiler / runtime and Angular 8 is the first update to publicly provide an opt-in move to Ivy.
To use Ivy in your project you can use the —enable-ivy switch to instruct the Angular CLI to activate Ivy in your project:
$ ng new angular-project --enable-ivy
In Angular version 9 Ivy is expected to be a default rendering engine.
Bazel offers one of Angular 8's newest features as a possibility to build your CLI application faster.
Bazel has the main advantages of:
Angular 8 facilitates the use of standard dynamic import syntax instead of a custom lazy-loaded module string.
It means lazy-loaded imports that sounded like:
{ path: '/student', loadChildren: './student/student.module#StudentModule' }
Will be looked like this:
{ path: '/student', loadChildren: () => import('./student/student.module').then(s => s.StudentModule) }
The Angular CLI is in continuous development. The ng build, ng test and ng run now come with 3rd party libraries and tool. AngularFire, for instance, already uses these new features with a deploy command.