Top Angular 10 Features

Bulruno
5 min readNov 30, 2020

--

Addition Of Dependency Injection

Performance Improvement

Propagation Of Correct Value Span

Fix For Service Worker

Run The Project

Fixes

Addition Of EntryPointFinder

Generic With ModuleWithProviders

Introduction To TypeScript 3.9

Merging Of Multiple Transition File

Async Locking Timeout

Improvement of NGCC Performance

Change In Angular NPM

Resolver Can Return EMPTY

Warning About Unknown Facts Are Errors

1. Addition of Dependency Injection

It has added the information for the dependency and also regarding the ng-content selections for the data. It helps in wrapping the ng content selections and can help in checking files by creating scripts and using various interfaces.

This would help us provide additional data that can be used in tools like Angular language services, which offers the functionality to offer suggestions and hints for the components or methods pre-defined in built-in libraries.

2. Performance Improvement

Improving performances can be done by a reduction in the size of the manifest named “entry point,” and also the manifest’s caching utility.

Also, dependencies are cached in the manifest called entry point and also can read from that location instead of computing now and then.

Before this version, although there was no requirement to process the entry point, NGCC could parse the files of the entry point for the computation of dependencies, which can utilize more time for the larger node containing modules.

3. Propagation of Correct Value Span

This feature in the Angular 10 assures the propagation of the actual value span using “ExpressionBinding,” present in the micro syntax of the ParsedProperty entity.

Following it, the ExpressionBinding helps propagate the span to the AST template, which includes both IVY and VE. This feature of Angular 10 can also be useful for compilers.

Here, an entity called name span is present for the calling of methods and reading the instances.

4. Fix for Service Worker

For a newly made developer, there is a fix for a situation that may arise in which there might be a chance that the developer forgets and never does the registration about the task running for the more extended period and also for the recursive timeouts.

This is done by fixation of migration of undecorated classes to the decorated and derived types of the initially undecorated course, which uses the features pre-defined in Angular.

5. Bug Fixes

Multiple amounts of bug fixes are done, which includes the avoid of the unidentified instances of the array in the compiler, and the error caused due to migration when the symbol does not exist is called. Also, the “Terser Inlining Bug” has been resolved in this version of Angular.

Also, the framework helps identify the modules that get affected due to the overrides occurring in the TestBed. It is one of the most effective Angular 10 Features.

6. Compiler Interface

The wrapping of the actual NGTSC compiler is being implemented in Angular 10.

This is the language-specific compiler service that manages files for type-check with the use of a project interface.

This is achieved by creating “Scriptinfos” as per the requirement.

7. Addition of EntryPointFinder

As the name suggests, the EntryPointFinder is a program based module used to find the entry points, which is added and can also be included from the imports specified in the program, mentioned by the tsjconfig.json file.

This is assumed to be utilizing less time in execution as compared to the DirectoryWalkerEntryPointFinder, especially in cases where the number of imports in the program is in a smaller number of the already present entry points.

8. Generic with ModuleWithProviders

The use of generic keywords has been made mandatory with the ModuleWithProviders in this version of Angular 10.

This requirement has aroused to make the ModuleWithProviders patterns work with the Ivy compiling and rendering sequence.

Before this implementation, the View layer of the MVC architecture has provided the facility with the ability to omit the generic keyword to be used with the ModuleWithProviders.

Again, a developer may want to use the View layer, and that might be dependent on the library that needs a generic type parameter to be included. Still, the use of generic is omitted, then it may cause a build error during the compilation process.

Here, ngcc could be of no help, and only the application logic code would be migrated, resulting in the library’s fixation by its native author.

To prevent this, skipLibChecks can be disabled by setting its binary value to false in config or while application update for using Ivy.

9. Introduction to TypeScript 3.9

According to the reports released by the AngularJS development team, removal of the support for TypeScript 3.8 has been done, and Angular 10 has now introduced TypeScript 3.9 as its latest feature.

This has also resulted in the removal of TypeScript 3.6 and TypeScript 3.7, which are no longer in support.

10. Merging of Multiple Transition File

Following the convention, earlier, it was possible to merge only one translation file per program.

But, after the release of new features of Angular 10, it is possible to combine multiple files in a single go.

Also, this transaction of the files will be made possible via messaging functionalities.

11. Async Locking Timeout

Configuration of async locking timeouts is still possible, which may add support to the ngcc.config.js file, setting the retry attempts and retry delays in the AsyncLocker.

A test has been integrated for a check for a timeout, utilizing the ngcc.config.js file so that the time out can be reduced, and the more extended execution of the test can be prevented.

12. Improvement of NGCC Performance

For the Improvement in the performance of the NGCC compiler, there is an activation of reporting stale locked file.

For reference, there is a string of a cached copy of the already parsed config and you can reuse it if the path of the conf file is the same.

13. Change in Angular NPM

To support the advanced optimizations of the Closure Compiler, Angular NPM now does not contain jsdoc comments.

This is a breaking change.

The closure compiler supports in individual packages are being experimental and also broken. If anybody is using the closure compiler, they are likely to consume Angular built-in packages from the sources directly, instead of the versions already present in NPM.

Currently, for the convenience, the users can use their now built pipeline with the flag –compilation_level=Simple.

You can use it for ensuring that the already built pipelines can produce constructible, runnable snippets, but at the cost of an increase in the size of the payload as the advanced level optimizations that already disabled.

Read also: Why Choose AngularJS For Web Development Project?

14. Resolver can return EMPTY

This feature helps in exiting the navigation. What you need to do is to define a resolver that returns empty.

Now, to continue with the navigation, the developers need to update the resolvers for some default value.

15. Warning About Unknown Facts are Errors

If any of the facts of the Angular 10 remain unknown, and a warning comes up at the time of the execution, then these are the errors.

Developers need not worry about the failure in an app, but it might execute various tools that have no relation to the current execution. Hence, Error!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response