Updates your workspace and its dependencies. See https://update.angular.io/.
ng update [packages..]
Perform a basic update to the current stable release of the core framework and CLI by running the following command.
ng update @angular/cli @angular/core
To update to the next beta or pre-release version, use the --next
option.
To update from one major version to another, use the format
ng update @angular/[email protected]^<major_version> @angular/[email protected]^<major_version>
We recommend that you always update to the latest patch version, as it contains fixes we released since the initial major release. For example, use the following command to take the latest 10.x.x version and use that to update.
ng update @angular/[email protected]^10 @angular/[email protected]^10
For detailed information and guidance on updating your application, see the interactive Angular Update Guide.
Argument | Description | Value Type |
---|---|---|
packages | The names of package(s) to update. | string |
Option | Description | Value Type | Default Value |
---|---|---|---|
--allow-dirty | Whether to allow updating when the repository contains modified or untracked files. | boolean | false |
--create-commits | Create source control commits for updates and migrations. Aliases: -C | boolean | false |
--force | Ignore peer dependency version mismatches. | boolean | false |
--from | Version from which to migrate from. Only available with a single package being updated, and only with 'migrate-only'. | string | |
--help | Shows a help message for this command in the console. | boolean | |
--migrate-only | Only perform a migration, do not update the installed version. | boolean | |
--name | The name of the migration to run. Only available with a single package being updated, and only with 'migrate-only' option. | string | |
--next | Use the prerelease version, including beta and RCs. | boolean | false |
--to | Version up to which to apply migrations. Only available with a single package being updated, and only with 'migrate-only' option. Requires 'from' to be specified. Default to the installed version detected. | string | |
--verbose | Display additional details about internal operations during execution. | boolean | false |
© 2010–2022 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/cli/update