Is there a way to specify angular version with the ng new command

It can be done by using npx command that downloads and runs the package without installing it.

For example, npx @angular/cli@9 new my-project creates a new folder my-project in the current folder and puts a new project here using angular version 9. The local version of @angular/cli in this case will be the same as used in npx command so you can just continue working.

The syntax of the command is as follows npx @angular/cli@<package version> new <project-name>.

Leave a Comment