gpt4 book ai didi

ASP.NET Core 中的 Angular 应用程序 6 : More than one module matches

转载 作者:行者123 更新时间:2023-12-05 03:03:02 24 4
gpt4 key购买 nike

Angular v6.1.10 | ASP.NET Core v2.2.102

我正在从 ASP.NET Core 模板构建 Angular 应用。

我想创建一个组件(鱼形)。

在 ASP.NET Core 2.0 中,一个简单的

ng g component fish-form --module=app.module.shared.ts

本来可以解决问题,但是对于这个架构,因为它没有那个文件,所以它不起作用。

This is the files structure.


我也尝试过使用

创建组件
ng g component fish-form

但是我收到以下错误:

Error: More than one module matches. Use skip-import option to skip importing the component into the closest module.

Command that I am running to create a form

感谢任何帮助。

最佳答案

这解决了问题:

ng g component fish-form --module=app.module.ts

关于ASP.NET Core 中的 Angular 应用程序 6 : More than one module matches,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54251659/

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