Angular just released a new minor release 9.1. Containing improvements and changes in new improved CLI introduced in previous major release 9.0.
Support of TypeScript 3.8 added, previously it was 3.6, 3.7.
TypeScript 3.8 comes with great features including the following:
- Top level await
- ES2020 for target and module
- “Fast and Loose” incremental checking
- export * as ns syntax
– convert to template string
– call hierarchy
End-to-End tests support
Now for running end-to-end tests the argument
invertGrep can be passed to the options of Protector builder, that makes it more easy to choose the test you want to run.
ng e2e --grep searchTerm
Directionality Query API:
If you application requires internationalisation with LTL and RTL. The application requires to have both locales with Left to Right and Right to Left support. You can query the current direction at runtime.
New CLI Component Generator option
displayBlock for CLI component generator is added in new version. It was initially displayed
inline which was supported by Angular components by default.
New version allows you to created a new component with an option of
--displayBlock style automatically.
ng generate component by-component --displayBlock
To turn this on,
key in your angular.json to true
ng config schematics.@schematics/angular:component.displayBlock true
Improved HTML and Expression syntax highlighting:
Editors just VSCODE with Language Service Extension, will allow the IDE to syntax highlight expressions in the templates, using a TypeScript-like formatter. Furthermore, it also adds syntax highlighting to the inline HTML templates of the components.
Build speed improvements:
The Angular build is done with
ngcc compiler with the help of CLI commands. Angular Libraries were created with the View Engine compiler.
ngcc compilation, initially, used to cover all of the Angular library dependencies sequentially. With Angular 9.1, The speed of the
ngcc has improved, allowing multiple packages to compile concurrently. These Changes will help to make the builds faster, improving the reliability for the teams dealing with the mono-repository workout space.
TSLint 6.1 by default:
New created projects will now use TSLint 6.1 by default, you can migrate to latest version but first make sure that you are on Angular version 9.1.
ng update @angular/cli --migrate-only tslint-version-6
The migration is not run automatically, 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.
How to update:
Update to the latest version of Angular to get access to these new capabilities and bug fixes.
ng update @angular/cli @angular/core
This is the last planned minor release for 9.x (As of Angular release blog). As they are moving towards 10.0, you should expect to see 10.0 prereleases usually once per week, even though they will contain only minimal changes at first.