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 :
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
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
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.
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:
- Framework Changelog: https://github.com/angular/angular/blob/master/CHANGELOG.md
- Angular CLI Changelog: https://github.com/angular/angular-cli/releases/tag/v9.1.0
- Angular Components Changelog: https://github.com/angular/components/releases/tag/9.2.0
Be sure to follow us on the social media to get notified about the latest posts as soon as they’re published