Creating Angular CLI components in a specified folder: how to specify the path?
Hello everyone!\n\nI recently started learning Angular and ran into a problem. I create components via Angular CLI with the command `ng generate component my-component`, and they are always created in the root folder `src/app`. But in my project I have a folder structure, for example, `src/app/features/user-profile` and `src/app/shared/ui`. I want new components to be created directly in the desired folder, not in the `app` root.\n\nI tried writing `ng generate component features/user-profile/user-card` — it gives an error that the folder is not found. If the folder exists, the component is created, but with the wrong prefix or without importing into the module.\n\nTell me how to correctly specify the path for creating a component in a specific folder? Do I need to configure Angular CLI in some way or is there a special syntax? And what about modules — if
No answers yet.
Log in to leave an answer