1

I'm using angular-cli for generate new components, services and directives. When i create component(ng g c), generator make subfolder in src/app. And this is ok. But when i create directive (ng g d) or service (ng g s), generator create files into src/app. After few creations it looks very messy. Is it a way to generate this parts in a specific paths? For example src/app/directives/

1 Answer 1

3

Just do

ng g directive directives/directiveName 

It will create directive into src/app/directives

Sign up to request clarification or add additional context in comments.

4 Comments

It works, but you have to create folder. Generator create a folder for every component but not for directives. Could i change generator for that?
I didn't find any way to do it. On our project, we create directory manually
Angular-cli create the directory automatically now if it doesn't exist :)
Yeah, i know that;) I finish few apps in ngX from that time.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.