Title: Ng Generator does not save components in correct directory · Issue #6431 · angular/angular-cli · GitHub
Open Graph Title: Ng Generator does not save components in correct directory · Issue #6431 · angular/angular-cli
X Title: Ng Generator does not save components in correct directory · Issue #6431 · angular/angular-cli
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 @an...
Open Graph 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/co...
X 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...
Opengraph URL: https://github.com/angular/angular-cli/issues/6431
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ng Generator does not save components in correct directory","articleBody":"\u003c!--\r\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION YOUR ISSUE MIGHT BE CLOSED WITHOUT INVESTIGATING\r\n-->\r\n### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [x] bug report -> please search issues before submitting\r\n- [ ] feature request\r\n```\r\n\r\n### Versions.\r\n@angular/cli: 1.0.3\r\nnode: 7.10.0\r\nos: darwin x64\r\n@angular/common: 4.1.3\r\n@angular/compiler: 4.1.3\r\n@angular/core: 4.1.3\r\n@angular/forms: 4.1.3\r\n@angular/http: 4.1.3\r\n@angular/platform-browser: 4.1.3\r\n@angular/platform-browser-dynamic: 4.1.3\r\n@angular/router: 4.1.3\r\n@angular/cli: 1.0.3\r\n@angular/compiler-cli: 4.1.3\r\n\r\n\r\n### Repro steps.\r\n\u003c!--\r\nSimple steps to reproduce this bug.\r\nPlease include: commands run, packages added, related code changes.\r\nA link to a sample repo would help too.\r\n-->\r\n`ng new my-app`\r\n`cd my-app/src/app && mkdir components`\r\n`cd components`\r\n`ng g component posts`\r\n\r\nThose 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.\r\n\r\n### The log given by the failure.\r\nNo logs. \r\n\r\n\r\n### Desired functionality.\r\n\u003c!--\r\nWhat would like to see implemented?\r\nWhat is the usecase?\r\n-->\r\nThe 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.\r\n\r\n\r\n### Mention any other details that might be useful.\r\n\u003c!-- Please include a link to the repo if this is related to an OSS project. -->\r\nHere's a screenshot of the file structure.\r\n\u003cimg width=\"262\" alt=\"screen shot 2017-05-23 at 7 56 55 pm\" src=\"https://cloud.githubusercontent.com/assets/16495816/26381339/09c8fd1a-3ff2-11e7-9a7f-79b284265dc4.png\">\r\n\r\n","author":{"url":"https://github.com/iamclaytonray","@type":"Person","name":"iamclaytonray"},"datePublished":"2017-05-23T23:58:49Z","url":"https://github.com/angular/angular-cli/issues/6431"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f73679dd-89aa-a4fe-02b8-4da896ac1f03 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C2CA:31D532:1828C19:200A60F:6B020F41 |
| html-safe-nonce | aaafd149b579ee272c8677db7747d02a3b33e4433464cdacb38d979d03681b69 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkNBOjMxRDUzMjoxODI4QzE5OjIwMEE2MEY6NkIwMjBGNDEiLCJ2aXNpdG9yX2lkIjoiMzQzMjM1NzEyMzk0NDc0NjgxNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0b2c65cb24174499f9d6df8ee02f86300265db043f49b8c0ebd5ceeb112592a2 |
| hovercard-subject-tag | issue:230882472 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/6431/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1499550c98ba2111b4f1f3df3379014bcd8fb07bde297703c1d72c0f8137f474/angular/angular-cli/issues/6431 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1499550c98ba2111b4f1f3df3379014bcd8fb07bde297703c1d72c0f8137f474/angular/angular-cli/issues/6431 |
| og:image:alt | 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/co... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | iamclaytonray |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width