ng g component in folder where currently residing creates component in root
when create a component in currently residing folder, my component is created in root structure:
/c/dev/ng2clienttracker/src/app/clients/components ng g component new-cmp installing component create src\app\new-cmp\new-cmp.component.css create src\app\new-cmp\new-cmp.component.html create src\app\new-cmp\new-cmp.component.spec.ts create src\app\new-cmp\new-cmp.component.ts
Could you fill out issues template to show what kind of version of the CLI you are using etc?
FYI, I am not having this issue on 1.0.0Beta-21 on macOS 10.12.2 with node 7.2.1 npm 4.0.3
@NilsHolger Here is the Answer.
Consider your project is recipe-book. first navigate to app folder by
- cd src
- cd app
then if you wants to create folder in app then simply type ng g c test
it will create in app folder now you wants to create component inside of test then type ng g c test/test2 it will create new component in test folder. see below pic

As @Nikki1993 said, please follow the questionnaire provided when opening a new issue. I tried this on MacOSX Sierra and cli 1.0.0.beta.22-1 and it works properly.

This seems windows specific.
No, this is not windows specific. I'm use angular-cli 1.0.0-beta24 and component not created in another component folder, but in root.
I have this issue in Ubuntu 16.04 and CLI version 1.0.0-beta.24
I have this issue on Windows 10, since beta version .23. I'm currently on 1.0.0-beta.24
@NilsHolger Here is the Answer.
Consider your project is recipe-book. first navigate to app folder by
- cd src
- cd app
then if you wants to create folder in app then simply type ng g c test
it will create in app folder now you wants to create component inside of test then type ng g c test/test2 it will create new component in test folder. see below pic

I have just tried to recreate this issue unsuccessfully, closing this issue as it cannot be reproduced, if you're still having the issue, please comment and we will re-evaluate.
Here is a screen-grab of my attempt to recreate. (with version 1.0.0-beta.25.5)

Angular CLI: 1.6.4
- Navigate at root of your project (
test-appin this case) - issue command
ng g c parentfolder/componentname(ng g c form-test/form-test-childin this case)

Result

I do not want app folder, I want if I run ng g c test then test folder will generate in src
ex: ng g c test it will generate in "src/app/test" I do not want app folder here I want test folder is in src.
please suggest
I think maybe lost in this thread was a question about how to specify the output directory of the generate command.
For example, right now it will always prefix the path with app/.
$ ./node_modules/.bin/ng generate component component/navigation
CREATE src/app/component/navigation/navigation.component.scss (0 bytes)
CREATE src/app/component/navigation/navigation.component.html (29 bytes)
CREATE src/app/component/navigation/navigation.component.spec.ts (656 bytes)
CREATE src/app/component/navigation/navigation.component.ts (346 bytes)
Would be great to get the result, but without app/, eg.
CREATE src/component/navigation/navigation.component.scss (0 bytes)
Is this possible through angular.json or CLI?
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.