{{announcement.body}}
{{announcement.title}}

Angular 9: What to Expect in New Version of Angular

DZone 's Guide to

Angular 9: What to Expect in New Version of Angular

In this article, we discuss what you can expect for Angular 9, including undecorated classes migrations and Ivy compiler as the default compiler.

· Web Dev Zone ·
Free Resource

shore-at-an-angle

Angular is one of the prominent open source frameworks for building web and mobile applications. The newest version, Angular 9, is smaller, faster, and easier to use, and it will be making Angular developers' life easier.

With Angular 9, the community can benefit from smaller, high-performance applications and better development experience. Developers also now have clear syntax and clear project structure.

A key goal of Angular 9 is to make the Ivy compiler available for all apps. The main benefit of Ivy is that it is able to significantly reduce the size of applications, regardless of size.

You may also like; Angular: Everything You Need to Know [Tutorials].

Angular 9 Features

  • Smaller bundles and better performance.
  • Added undecorated classes migration schematic in the core.
  • Support for TypeScript Diagnostics Format.
  • The formControlName also accepts a number in the form.
  • Internationalization support for Angular Ivy.
  • Selector-less directives as base classes in View Engine in the compiler.
  • Added support for selector-less directive as base classes in Ivy.
  • Ivy compiler is now the default for ngc.
  • Convert all ngtsc diagnostics to ts.Diagnostics.
  • Bazel: support ts_library targets as entry-points for ng_package.
  • Core: add dynamic queries schematic.
  • Core: Mark TestBed.get as deprecated.
  • Ivy: expose window.ng.getDebugNode helper and also support ng-add in localize package.
  • Ivy: i18n —add syntax support for $localize metadata block.
  • Ivy: i18n — reorganize entry-points for better reuse.
  • Language-service: enable logging on TypeScriptHost.
  • Language-service: provide diagnostic for invalid templateUrls.
  • Language-service: provide diagnostics for invalid styleUrls.

Notable Changes in Angular 9

1) Ivy applications: Previously, in applications, Hammer providers were included by default. With this commit, apps that want Hammer support must import HammerModule in their root module i.e.

 import {HAMMER_PROVIDERS} from './dom/events/hammer_gestures' 

2) ServiceWorker: Remove deprecated option versionedFiles from service worker asset group configuration in ngsw-config.json

Updated service worker

3) Performance Improvements:

  • Ivy: don’t store public input names in two places.
  • Ivy: fix creation time micro-benchmarks.
  • Ivy: Improve performance of transplanted views.
  • Ivy: avoid native node retrieval from LView.
  • Ivy: avoid repeated native node retrieval and patching.
  • Ivy:avoid repeated tNode.initialInputs reads.
  • Ivy:move local references into consts array.
  • IvyR3TestBed – Do not process NgModuleDefs that have already been processed.

Bug Fixes

1) Common: update $locationShim to notify onChange listeners before emitting AngularJS events.

2) Compiler: return enableIvy true when using readConfiguration.

3) Ivy:

  • Get name directly from nativeNode.
  • Handle empty bindings in template type checker.
  • In ngcc, handle inline exports in commonjs code.
  • The ngcc should only index .d.ts exports within the package.
  • The ngTemplateOutlet error when switching between null and template value.

4) language-service:

  • Instantiate MetadataResolver once.
  • Remove "context" used for module resolution. 

5) Ngcc:

  • Handle deep imports that already have an extension.
  • Ignore format properties that exit but are undefined.


Further Reading

Topics:
angualr ,web dev ,spa ,bazel ,ivy ,component ,angular 9

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}