gpt4 book ai didi

angular-cli - 现有 github 项目的 Angular cli

转载 作者:行者123 更新时间:2023-12-04 05:46:34 25 4
gpt4 key购买 nike

我是新来的 Angular 2 CLI .根据教程,提供了名为 ng create <project_name> 的命令.我的方案是在现有目录中创建项目。

它抛出如下错误:

Directory 'angular-basic' already exists.

最佳答案

试试 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.

For New Angular 2.x Project


ng new foo
cd foo
npm link angular-cli
ng serve

引用:
https://cli.angular.io/reference.pdf

关于angular-cli - 现有 github 项目的 Angular cli,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41190144/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com