Reputation: 13582
Angular v6.1.10 | ASP.NET Core v2.2.102
I am building an Angular app from an ASP.NET Core template.
I want to create a component (fish-form).
In ASP.NET Core 2.0, a simple
ng g component fish-form --module=app.module.shared.ts
Would solve the problem, but with this architecture, as it doesn't have that file, it doesn't work.
I have also tried to create the component using
ng g component fish-form
But I am getting the following error:
Error: More than one module matches. Use skip-import option to skip importing the component into the closest module.
Any help is appreciated.
Upvotes: 3
Views: 948
Reputation: 725
You have two options
ng g component fish-form --skipImport=true
. This will remove the error, but not import the component.ng g component fish-form --module=app.module.ts
Upvotes: 1
Reputation: 13582
This fixed the problem:
ng g component fish-form --module=app.module.ts
Upvotes: 3