On 24th June 2020, Angular 10 was launched but this time, with the beta version. It’s a big release; nevertheless, this most recent angular version will highly focus on the quality tools and ecosystem instead of launching new features.
In case you are a web app developer, who uses Angular for every project, you should be seeking the basic features and value additions of the latest Angular version 10. Let’s take a look at the key features and value offerings of Angular 10!
It’s available as an extension for Visual Studio Code, WebStorm, and Sublime Text. You can install it by using the following command:
A compiler interface has been added that wraps the actual ngtsc compiler. The language-service-specific compiler manages multiple typecheck files using the project interface, creating ScriptInfos as necessary.
Remove HTML entities’ autocompletion. Autocompletion is being removed from HTML entities, such as &, <, etc., because it’s outside the core functionality of Angular LS, and it has questionable value and a performance cost.
Compiler - Angular offers 2 ways to compile your application:
Ivy is a Compiler that is complete rewrite of the compiler (and runtime) in order to:
The 2 new Compiler Entry Points - Angular has introduced 2 new Compiler Entry Points: ngtsc and ngcc.
Ngtsc - It compiles Ivy-compatible code. It’s a TypeScript-to-JavaScript transpiler that looks for Angular decorators like @Component and substitutes them with their specific Angular runtime instructions/counterparts, like eedefineComponent. It’s a minimal wrapper around tsc. The ngc operates as ngtsc when the angularCompilerOption enableIvy flag is set to true.
Compilation Flow - When ngtsc starts running, it first parses the tsconfig.json and then creates a ts.Program. Several things need to happen before the transforms described above can run and that is:
Ngcc - It stands for Angular Compatibility Compiler. It converts pre-Ivy modules (old style) to Ivy-compatible code. It processes code coming from npm and produces the equivalent Ivy version as if the code was compiled with ngtsc. Ngcc can also be run as part of a code loader like webpack to have packages from node_modules transpiled on the fly.
More-strict Project Setup - Optional stricter settings offer a more-strict project setup when creating a new workspace with ng new, via ng new -- strict. Enabling this flag initializes a new project with new settings to improve maintainability, help catch bugs, and allow the CLI to do advanced optimizations on an app.
Router - For the router, the CanLoad guard now can return Urltree. A CanLoad guard returning Urltree cancels the current navigation and redirects. This matches current behavior available to CanActivate guards that also has been added. This doesn’t affect preloading. A CanLoad guard blocks any preloading; any routes with a CanLoad guard won’t be preloaded, and the guards won’t be executed as part of preloading.
Angular Material - Angular Material now includes a new date range picker. To use the new date range picker, you can use the mat-date-range-input and mat-date-range-picker components.
TSlib - The runtime library for TypeScript containing helper functions, has been updated to V2.0.
TSLint - The TSLint static analysis tool for TypeScript has been updated to v6.
Angular Package Format - Angular Package Format no longer includes ESM5 or FESM5 bundles, saving download and install time when running yarn or npm install for Angular packages and libraries.
Browser Support - The browser configuration for new projects has been updated to exclude older, less-used browsers. Support is deprecated for Internet Explorer 9, Internet Explorer 10, and Internet Explorer Mobile.
Core - Warnings about unknown elements are now logged as errors. This won’t break your app, but it may trip up tools that expect nothing to be logged via console.error.
Async Locking Timeout - Async Locking Timeout’s configuration is still probable, which may include assistance in the ngcc.config.js file, adjusting the retry delays and retry attempts in the AsyncLocker.
An examination has been combined for monitoring for the timeout, using the ngcc.config.js file to lower the timeout and prevent the more maximized application of the test.
14. Bug Fixes:
This is Ravi Bhindi, Front End Developer at MagnusMinds IT Solution LLP. I am having vast experience working on front end frameworks like Javascript, AngularJs, Angular, ReactJs, Ionic-angular. Also, having experience in Web designing using CSS, SASS, Bootstrap.