Angular › Angular Schematics & Custom Builders
How would you use Angular's automatic update schematics to upgrade a project to a new major version?
IntermediateAnswer
Running ng update with the Angular package name automatically applies migration schematics that update your code to match breaking changes in the new version, such as renaming APIs or adjusting configuration files, saving significant manual work compared to reading through changelogs and fixing everything by hand.
ng update @angular/core @angular/cli
// Automatically updates dependencies and runs any needed migration schematics
// to adjust your code for breaking changes in the new versionReal-world example A team upgrading from an older Angular version to the latest one runs ng update, which automatically fixes several breaking changes in their configuration files, saving hours of manual migration work.