Skip to content

Angular CLI 1.4.2 is generating unwanted directories when root directory is custom (src/app1) #7869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gkrajput opened this issue Sep 28, 2017 · 5 comments
Assignees
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity3: broken

Comments

@gkrajput
Copy link

gkrajput commented Sep 28, 2017

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.4.3
node: 6.11.3
os: win32 x64
@angular/animations: 4.4.3
@angular/common: 4.4.3
@angular/compiler: 4.4.3
@angular/core: 4.4.3
@angular/forms: 4.4.3
@angular/http: 4.4.3
@angular/platform-browser: 4.4.3
@angular/platform-browser-dynamic: 4.4.3
@angular/platform-server: 4.4.3
@angular/router: 4.4.3
@angular/cli: 1.4.3
@angular/compiler-cli: 4.4.3
@angular/language-service: 4.4.3
typescript: 2.3.4

Repro steps.

I am using Angular CLI to support multiple applications within one project.
"apps": [ { "name": "app1", "root": "src/app1", "outDir": "dist/app1", . . }, { "name": "app2", "root": "src/app2", "outDir": "dist/app2", . . } ]
But when I am running following command to generate a service
C:\POC\test1\src\app1\app>ng g service test --app=app1
Service is generated like this

create src/app1/src/app1/app/test.service.spec.ts (362 bytes)
create src/app1/src/app1/app/test.service.ts (110 bytes)

Desired functionality.

It should be created like
create src/app1/app/test.service.spec.ts (362 bytes) create src/app1/app/test.service.ts (110 bytes)

Mention any other details that might be useful.

I asked this question on StackOverflow https://stackoverflow.com/questions/46456124
Response:

I would say you found a bug. Tested your setting on Angular CLI v.1.2.0 and v.1.3.2 both working fine, but at v.1.4.2 and latest v.1.4.3 I get the same behaviour.
Since the Angular CLI release notes of 1.4.x don't spot any significant changes I guess the behaviour is not intended. Maybe downgrade for a while or open a bug report.

@Brocco Brocco self-assigned this Sep 29, 2017
@Brocco Brocco added P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity3: broken labels Sep 29, 2017
@mattheiler
Copy link

mattheiler commented Oct 3, 2017

Present in 1.4.0, but not 1.3.2. I would look into 128187e.

@Brocco
Copy link
Contributor

Brocco commented Oct 5, 2017

This should be handled via PR #7775.

@Brocco Brocco closed this as completed Oct 5, 2017
@darinclark
Copy link

Checking: Do I correctly understand that this has been fixed for Angular CLI 1.5.0, which requires Angular 5, but has not been fixed for Angular CLI 1.4.x, which uses Angular 4?

@vvolodin
Copy link

And how does #7775 help with this?

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity3: broken
Projects
None yet
Development

No branches or pull requests

5 participants