What is New in Angular 9?

Ivy

Version 9 moves all applications to use the Ivy compiler and runtime by default. This offers numerous advantages:

  • Smaller bundle sizes
  • Faster testing
  • Better debugging
  • Improved CSS class and style binding
  • Improved type checking
  • Improved build errors
  • Improved build times, enabling AOT on by default
  • Improved Internationalization

New options for ‘providedIn’

In addition to the previous root and module options, you have two additional options.

  • platform— Specifying providedIn: 'platform' makes the service available in a special singleton platform injector that is shared by all applications on the page.
  • any— Provides a unique instance in every module (including lazy modules) that injects the token.

New components

You can now include capabilities from YouTube and Google Maps in your applications.

  • You can render a YouTube Player inline within your application with the new youtube-player. After you load the YouTube IFrame player API, this component will take advantage of it.
  • We are also introducing google-maps components. These components make it easy to render Google Maps, display markers, and wire up interactivity in a way that works like a normal Angular component, saving you from needing to learn the full Google Maps API.

Web Worker Support

You can now generate new web workers from the CLI. Web workers allow you to offload work to a background thread, for any sort of cpu-intensive processing such as image or video manipulation. Web workers are a great way to speed up your application.

TypeScript 3.7 support

Angular has been updated to work with TypeScript 3.6 and 3.7, including the extremely popular optional chaining feature in TypeScript 3.7.