Top New Features introduced into Angular 9 / What's majorly new in Angular 9

what's new into Angular 9 or Features into Angular 9

If you would like to know the features or new things which got introduced into Angular 9 then you are at the right place. Here into this article we are going to discuss what are the new things got introduced into Angular 9 or what are the features got introduced into Angular 9

Angular Features

  1. Default Ivy Compiler
  2. Smaller Bundles and Performance
  3. Typescript 3.7 Support
  4. Service Worker Updates
  5. Enables the AOT compiler on by default
  6. i18n Improvements
  7. Need for Faster Mobile Apps
  8. Changes with Angular Forms
  9. Dependency Injection Changes in Core
  10. Lazy load Angular components
  11. Angular Component Updates
  12. API Extractor Updates

Default Ivy Compiler

The more awaited very big new feature Ivy compiler is available  default for Angular 9, which will make sure to make your angular apps built with Ivy are faster and more efficient. So user won't require to add any compiler options in tsconfig.json file to enable Ivy like Angular 8.

Smaller Bundles and Performance

Into Angular 9 IVY complier make sure that you Angular Application production bundle will have lower size in result we can faster build generation and the performance for the same application will get increased

Service Worker Updates

In current version of Angular 9, for service workers the deprecated versioned files option in the service worker asset group config has been removed. This means that your new ngsw-config.json file that looked like below file:
"assetGroups": [
{ "name": "visionfortech", "resources": { "versionedFiles": [ "/**/*.txt" ] } } ]

will now look something like below

"assetGroups": [
{ "name": "visionfortech", "resources": { "files": [ "/**/*.txt" ] } } ]

i18n Improvements

Angular a JavaScript framework is supporting internationalization, and with the Angular CLI you can generate standard codes that will help create translator files so that your angular application can be published in multiple languages. This process has been even further refactored by the Angular team on Ivy to make it easier by adding compile-time inlining.

Changes with Angular Forms

Into Angular 9 there are some more changes related to Angular Form. First change is <ngForm></ngForm> is no longer supported for Angular Form instead you need to use <ng-form></ng-form>.Second, the FormsModule.withConfig is no longer supported instead you have to use FormsModule directly.

Angular Component Updates

There is an upgrade for the @angular/cdk on Hammer.js, which allows to include gesture support and was needed if you chose to use the CDK. It's possible now. You can import it with this below command optionally:

import "HammerModule" from [@angular/platform-browser]

Dependency Injection Changes in Core

The new version of Angular has minor improved for dependency injections. This is not a big change but some support.functionality has been added for the providedIn value section of dependency injections.

@Injectable({ providedIn: 'platform' })  class VisionfortechService {...}
  1. Platform : Specifying providedIn: 'platform' makes the service available on a special singleton platform injector that is used by all applications on the page.
  2. Any : Provides a unique instance in each module (including lazy modules) that injects the token.

Enables the AOT(Ahead-of-time) compiler on by default

In the current IVY architecture, we see a so many changes in the compiler's performance. This means that the AOT(Ahead-of-time) builds will be noticeably faster. The change in the compiler and runtime, will no longer require entryComponents. and ng serve. These components in latest version of Angular 9 will compile automatically depending on their usage.

Need for Faster Mobile Apps

Now a days mobile usage is rapidly growing around the quarter of the website traffic is made up of phones and other mobile devices. Some percentage of these mobile devices is going to access web pages from slow internet connections. Its important to decrease downloadable resources and increase mobile user experience,to get that Ivy helps in speed application startup by reducing the size of JavaScript classes.

Hope you enjoyed the article and it got added something new to your knowledge.
To Learn more about Javascript Javascript Treasure.
To add something new every-time into your mind stay tuned to visionfortech.

Happy Learning.....!!!