Features of Angular 8:
- Angular
8 supports TypeScript 3.4
- Angular
8 supports Web Workers
- The
new compiler for Angular 8 is Ivy Rendering Engine
- Angular
8 provides dynamic imports for lazy-loaded modules.
- Improvement
of ngUpgrade
TypeScript 3.4
Angular 8 supports TypeScript 3.4 and it is
required to run your Angular 8 project.
Web workers class
JavaScript is single threaded, so it is common for
more critical tasks like data calls to take place asynchronously. Web Workers
facilitates you to run the CPU intensive computations in the background thread,
freeing the main thread to update the user interface.
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.
ng generate worker n-queens
More about Ivy and
Bazel
Ivy is the new rendering engine 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.
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:
- The
incremental build and tests.
- It
provides a chance to make your backends and frontends with a same tool.
- It
has a possibility to have remote builds and cache on the build farm.
Dynamic imports for
lazy-loaded modules
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:
{ path: '/student', loadChildren: './student/student.module#StudentModule' }
Will be looked like this:
{ path: `/student`, loadChildren: () => import(`./student/student.module`).then(s => s.StudentModule) }
Improved Angular
CLI Workflow
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.
No comments:
Post a Comment