What's the difference between angular-cli and

2019-02-04 15:59发布

问题:

There are 2 angular cli packages available on npm:

angular-cli which is currently at 1.0.0-beta.28.3

@angular/cli which is currently at 1.0.0-beta.31

What is the difference between these 2 packages, and which is the right one to use for a new project?

The angular docs aren't particularly clear here. https://cli.angular.io/ says to npm install -g angular-cli, while https://github.com/angular/angular-cli says to npm install -g @angular/cli

回答1:

@angular/cli is the new package, which name is according to another Angular 2 modules names like @angular/common, @angular/router and so on.

And also @angular/cli requires Node 6.9.0 or higher, but angular-cli requires Node 4 or higher. So @angular/cli with Node 4 will not work.



标签: angular npm