“ng new”选项 - angular-cli

时间:2017-11-06 02:50:26

标签: javascript node.js angular angular-cli

安装后,

$ node -v
v6.11.5
$ npm -v
3.10.10
$ ng --version
0.7.0
$ which ng
/usr/bin/ng
$ ng

  Usage: ng <command> [options]


  Options:

    -V, --version  output the version number
    -h, --help     output usage information


  Commands:

    init              Alias for "yo ng-factory"
    build             Alias for "gulp ng:build"
    serve [options]   Alias for "gulp ng:serve"

ng没有new选项在命令下运行,

$ ng new angular-project

这是ng包的正确安装吗?

1 个答案:

答案 0 :(得分:2)

我不这么认为。当前版本的angular-cli1.5.0source)。您需要重新安装:

npm -g uninstall @angular/cli
npm -g install @angular/cli