Angular 6 CLI command to create a Component in a specific folder

Asked

Viewed 1,879 times

1

Is there any way to create a Component in Angular 6 CLI by specifying which folder it should be in? I searched the net and found the ng g c nome-componente --module=app but this is just to say that it will stay in the app I tried to be like --module=app/minha-pasta, --module=app\minha-pasta and etc to try to specify in which folder I want to get this Commit but nn got, someone knows how to do this?

1 answer

2


Try it like this

ng g component minha-pasta/component --flat

The flat parameter serves to generate the files without creating a new folder

Browser other questions tagged

You are not signed in. Login or sign up in order to post.