Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create Component without folder

I need to create a component without the folder. I am using Angular-Cli command ng g c testing to create the component. But, the command creates an folder wrapper for the newly created component.

like image 629
saravanam cs Avatar asked May 28 '19 04:05

saravanam cs


People also ask

Does Ng generate component create folder?

We can use ng generate component command to create component in sub-directory or specific folder.

Can we create component inside component in Angular?

The Angular framework allows us to use a component within another component and when we do so then it is called Angular Nested Components. The outside component is called the parent component and the inner component is called the child component.


1 Answers

You can use --flat flag.

ng g c test --flat

For more information follow this link

flat = true | false

When true creates the new files at the top level of the current project.

Default: false

like image 163
Denuka Avatar answered Oct 08 '22 18:10

Denuka