Angular 9.1 released with TypeScript 3.8, build speed improvements and more

Angular 9.1 released

The Angular team just released version 9.1 of the Angular framework. Angular 9.1 is a minor release of the framework and the CLI that is a drop-in replacement for 9.0 containing new features and bug fixes. Here are some of the prominent features and fixes in Angular 9.1 :

If you’re new to Angular, you might be interested in understanding the Angular Project Structure. If you’re just interested in Angular overall, take a look at our other Angular Related Articles.

Build Speed Improvements in Angular 9.1:

The Angular libraries you use with Angular v9 are made compatible with the Ivy compiler via the ngcc tool. Previously, the ngcc compilation pass covered all of your Angular library dependencies sequentially. In 9.1, ngcc comes with improved the speed to help it compile multiple packages concurrently. These changes will help make builds faster and improve reliability for teams with monorepository-style workspace layouts.

Angular 9.1 Comes With New TypeScript version 3.8

Angular 9.1 comes with support for TypeScript 3.8, in addition to the existing support for 3.6 and 3.7. This release adds many great features to the TypeScript language, including:

  • Type-Only Imports and Exports
  • ECMAScript Private Fields
  • Top-level await

To know more about TypeScript 3.8, click here.

New CLI Component Generator Option displayBlock:

Angular components are displayed inline by default, as that’s the default for most DOM elements. It’s very common for developers to want components to use the display: block style. When you create a new component, you can now set this up automatically.

ng generate component my-component --displayBlock

You can also turn this on by default by setting the schematics. @schematics/angular:component.displayBlock key in your angular.json to true, or use:

ng config schematics.@schematics/angular:component.displayBlock true

End-to-End tests in Angular 9.1 support grep and invertGrep:

When running end-to-end tests, the grep and invertGrep options are passed to the Protractor builder, allowing developers to more easily choose the test they want to run.

ng e2e --grep searchTerm

Improved HTML & Expression Syntax Highlighting:

If you use VSCode and our Language Service Extension, starting today our extension will allow your IDE to syntax highlight expressions in your templates, using a TypeScript-like formatter. It will also add syntax highlighting to your inline HTML templates in your components.

Angular 9.1 comes with TSLint 6.1 by default:

Newly created projects will now use TSLint 6.1 by default. If you want to migrate to the latest version, you can opt-in via

ng update @angular/cli --migrate-only tslint-version-6

Point to be noted here is that this migration is not run automatically because there are some minor breaking changes in TSLint 6.1.

What more?

This release includes lots of other bug fixes, performance improvements, and minor features. Version 9.1 also improves the compatibility story with our new compiler and runtime. If you previously attempted to enable Ivy with version 9.0 and ran into issues, try again with version 9.1.

You can find the full list of changes here:

Be sure to follow us on the social media to get notified about the latest posts as soon as they’re published

Leave a comment

Your email address will not be published. Required fields are marked *