I know that you want to make a child component inside of an existing one, but that is no different to any other cli, like many others already commented.
(ng g component <folder_name>/<component_name>)
Now to the question that got me here: "How to generate components in a specific folder with Angular CLI?"
I would define the generate location of components in the angular.json configuration, so that you do not have to remember anything and can not make grammer mistakes or spelling errors. This also speeds things up, because you do not have to repeat yourself over and over again.
I hope this helps someone, because I thought I would find out, how to do this, under this post and didn't find the solution in the docs.
This is what you have to add in projects.<project_name>.schematics:
{
"@schematics/angular:component": {
"path": "src/app/components",
"style": "css"
},
"@schematics/angular:service": {
"path": "src/app/services"
},
"@schematics/angular:interface": {
"path": "src/app/types"
},
"@schematics/angular:enum": {
"path": "src/app/types"
}
...
}
ng generate component plainsightas a parent and now you want to generate a child then just run:ng generate component plainsight/childng generate component path/to/folder/plainsight -d