安装后,
$ 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
包的正确安装吗?
答案 0 :(得分:2)
我不这么认为。当前版本的angular-cli
为1.5.0
(source)。您需要重新安装:
npm -g uninstall @angular/cli
npm -g install @angular/cli