我是Angular 2 CLI的新手。根据教程,提供了名为的命令ng create <project_name>
。我的情况是在现有目录中创建项目。
它引发如下错误:
目录“ angular-basic”已经存在。
尝试ng init
将在现有目录中创建项目,然后执行ng serve
。
ng init <project-name> [options]
Creates a new Angular project in the current folder.
Options:
--dry-run only output the files created and operations performed, do
not actually create the project.
Alias: 'd'.
--verbose output more information.
Alias: 'v'.
--skip-npm do not run any npm command once the project is created.
--name The name of the project to create.
对于新的Angular 2.x项目
ng new foo
cd foo
npm link angular-cli
ng serve
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句