Version 10.0.0 is here! This is a major release that spans the entire platform, including the framework, Angular Material, and the CLI. This release is smaller than typical; it has only been 4 months since we released version 9.0 of Angular.
How to update to version 10
Visit update.angular.io for detailed information and guidance. To have the best update experience,
Update to 10
ng update @angular/cli @angular/core
In order to update your global angular,
npm i -g @angular/cli
New Date Range Picker
Angular Material now includes a new date range picker.
Stakblitz example - Stackblitz
Warnings about CommonJS imports
Starting with version 10, we now warn you when your build pulls in one of these bundles. If you’ve started seeing these warnings for your dependencies, let your dependency know that you’d prefer an ECMAScript module (ESM) bundle.
Optional Stricter Settings
Version 10 offers a more strict project setup when you create a new workspace with ng new.
ng new --strict
Enabling this flag initializes your new project with a few new settings that improve maintainability, help you catch bugs ahead of time, and allow the CLI to perform advanced optimizations on your app. Specifically, the strict flag does the following:
- Enables strict mode in TypeScript
- Turns template type checking to Strict
- Default bundle budgets have been reduced by ~75%
- Configures linting rules to prevent declarations of type any
- Configures your app as side-effect free to enable more advanced tree-shaking
For more lets hear it from the creators
Credits : Official Announcement 😄