When you use the command line to create a component, it will be added to the src/app folder.
The following command:
ng g c shoppingList
will create a folder named ‘src/app/shopping-list’, which contains:
shopping-list.component.css shopping-list.component.html shopping-list.component.spec.ts shopping-list.component.ts
Alternatively, if I want to create a folder called ‘shopping’ and inside that have an item called list, I could use this command:
ng g c shopping/list
And that will give this structure:
src app shopping list list.component.css list.component.html list.component.spec.ts list.component.ts
What if we don’t want the spec.ts files?
ng g c shopping/list --spec false