Angular-cli: ng g component always creates a new directory with the same name as the component.

Created on 26 Jul 2016  路  3Comments  路  Source: angular/angular-cli

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Mac OSX (El Capitan?)
  2. Versions. Please run ng --version. If there's nothing outputted, please
    run in a Terminal:
    node --version
    And paste the result here.

angular-cli: 1.0.0-beta.10
node: 6.3.1
os: darwin x64

  1. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

generated app with the CLI tool.

every time I run ng g component my-ComponentName it generates a new directory. I do not always want a directory per component.

RFC / discussion / question

Most helpful comment

That is the intended default behaviour. You can use the -- flat flag to not create this folder though.

All 3 comments

That is the intended default behaviour. You can use the -- flat flag to not create this folder though.

screen shot 2019-02-11 at 22 33 32

it's --flat there is no space

e.g ng g c login --flat

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings