Angular 9.0.0 version is here. This is a major release that covers platform framework, angular material and command-line interface(CLI). This release switches applications to the Ivy compiler and runtime by default. It also initiates improved ways for testing components.
This is one of the biggest update Angular team has made. Angular 9 support typescript 3.7
How to update to Angular 9:
You can visit update.angular.io where you will find detailed information and guidance to update your projects to Angular 9. But to get the best update experience, it is best to update the project into Angular 8 (previous version).
You can update your project into Angular 8 using the following link:
Angular 8: How to update and features
or you can also update to Angular 8 through update.angular.io
So, you have to update your project to Angular 8 and then to Angular 9.
Ivy
With the Angular 9 version, all applications will use Ivy compiler and runtime by default.
Ivy feature and advantages:
1. Smaller bundle sizes:
The Ivy compiler removes part of Angular that is not being used. Because of this, less code is generated for each angular component. With the Angular 9 update, small apps that don’t use many angular features will get benefit by tree shaking. With reduced factory size, large apps with many components will benefit. The angular team says that “Small apps could see around a 30% decrease in bundle size, large apps will see a 25–40% decrease, and medium apps decrease minimally.“
2. Faster testing:.
Angular team has revamped the implementation of TestBed in Ivy to achieve maximum productivity. Because of this change tests are about 40% faster. So, you should expect to see an application test at a faster speed of around 40%-50%.
3. Improved build times and AOT enabled by default:
Angular team has revamped the implementation of TestBed in Ivy to achieve maximum productivity. Because of this change tests are about 40% faster. So, you should expect to see an application test at a faster speed of around 40%-50%.
4. ‘providedIn’ options:
In previous versions of angular when you were using @Injectable, you were only able to use root and module options. But with this Angular 9 update, two new options are added: platform and any.
platform: If you mention providedIn: ‘platform’, then it will make service as a single platform injector. By doing this, this service will be shared by all applications used on the page.
any: This option provides a unique instance in each module even in lazy modules.
Learn more here: providedIn
5. Improved CSS class and style biding
6. Improved type checking
7. Improved build errors
8. Better Debugging
Introducing New components:
You can use youtube-player within your application after loading Youtube IFrame Player API.
Angular is also launching google-maps component. These components will make it easier to use Google-maps and to use its features.
See also:
You can learn more about angular here: Angular Articles
Great content! Super high-quality! Keep it up! 🙂