Everything you should know about Angular 10
The version 10.0.0 of Angular framework is released now. It is known as Angular 10 and released on June 24, 2020. Angular 10 is a major release, and the changes introduced are reflected on the entire platform, including the framework, Angular Material, and the CLI.
Major changes introduced in Angular 10
Let's see what Angular 10 is, what's new in Angular 10, and the new features and breaking changes the Google-developed web framework Angular 10 has introduced to us:
1. New Date Range Picker
Angular 10 has introduced a new date range picker. If you want to use the new date range picker, you can easily do it by using the mat-date-range-input and mat-date-range-picker components.
2. Warnings about CommonJS imports
In the previous Angular versions when you use a dependency that is packaged with CommonJS, you would get the result in the form of larger and slower applications.
With the introduction of Angular 10 when you use any of these bundles, it will give you a warning message. If you get these warnings for your dependencies, you should prefer an ECMAScript module (ESM) bundle for your project.
3. Optional Stricter Settings
Angular 10 provides a stricter project setup when you create a new workspace in Angular 10 by using the ng new command
Use the following command to enable this strict feature.
After enabling this feature, your new project initializes some settings that improve your app's overall features such as maintainability, find bugs ahead of time and allow the CLI to perform advanced optimizations on your app.
Following is the list of actions that the strict flag does specifically:
4. Keeping Up to Date with the Ecosystem
The most important updated dependencies in Angular 10 are:
5. New Default Browser Configuration
Angular 10 has updated the browser configuration for new projects. In this updated version, the older and less used browsers are now excluded. You can see the differences of by default supporting browsers clearly by comparing the Angular version 9 and Angular version 10.
List of default browsers in version 9
You can check it by using the npx browserslist command.
List of default browsers in version 10
You can see that many by default, supporting browsers are excluded now in the new version. This is all because of disabling ES5 builds by default for new projects. If you want to enable ES5 builds and differential loading for browsers, you can simply add the required browsers you need to support in the .browserslistrc file.
6. Deprecations and Removals
Angular 10 has made many changes in which the new version has done several deprecations and removals.
7. Resolved issues & Bug fixes
The updated new Angular 10 version has resolved many issues and fixed bugs we have faced in previous versions.
A lot number of bug fixes have been made in Angular 10. Following is a list of some bug fixes and resolved issues:
How to update to Angular version 10 from the previous version
It is always a best practice to use the updated version of any software. In the same way, you should use the latest Angular version. Here, we are specifying how to upgrade your older version of Angular in the latest one. It doesn't matter which Angular's version you are using, you can easily upgrade it to Angular latest version by using the following steps: