Description
Bug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.0.3
node: 7.10.0
os: darwin x64
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.0.3
@angular/compiler-cli: 4.1.3
Repro steps.
ng new my-app
cd my-app/src/app && mkdir components
cd components
ng g component posts
Those are the only steps I took. I didn't touch the code. I just ran those commands. However, the posts component did not save under the components
directory. They were saved in the app
directory, even though I was in the components
directory when running the generator. I am pretty new to Angular (first day) so I am not sure if that is the expected result or not. I wouldn't imagine that being the case, though.
The log given by the failure.
No logs.
Desired functionality.
The answer is for both questions. When you are in a specific directory and run ng g component component-name
, the generated files should be a child of your current directory via the command line.