How to create an Angular 10/9 component in a folder?

0

 
How to generate a component in a specific folder with Angular 10 CLI?
 
If you run the following command:
 

ng g  c mycomponent

 
You’ll get the following folder structure:
 

src > app >mycomponent > myocmponent.component.ts

 
How to proceed uf you need to create the component in a different folder?

1
0

Angular CLI allows you to do that very easily by simply prepending the name of the folder as follows:

 

ng generate component myfolder/mycomponent 
Skip to toolbar