Skip to content

Instantly share code, notes, and snippets.

@jgololicic
Last active July 22, 2018 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgololicic/7ef0712d840ea3e3a41ec0ca5ec0d18c to your computer and use it in GitHub Desktop.
Save jgololicic/7ef0712d840ea3e3a41ec0ca5ec0d18c to your computer and use it in GitHub Desktop.
Angular CLI generate component in non-standard Angular project directory structure

Angular CLI generate component in non-standard Angular project directory structure

If you have Angular project with non-standard directory structure, for example:

server
    js
    models
    ...
client
  app
    components
    shared
    ...

You can still use Angular CLI generator to generate component (and other) in the right folder, you need to provide --path parameter.

ng g c shared/map-browser app.config --path=client/app --dry-run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment