angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

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

Open gkrajput opened this issue 9 years ago • 5 comments

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.

gkrajput avatar Sep 28 '17 14:09 gkrajput

Present in 1.4.0, but not 1.3.2. I would look into https://github.com/angular/angular-cli/commit/128187e.

mattheiler avatar Oct 03 '17 20:10 mattheiler

This should be handled via PR #7775.

Brocco avatar Oct 05 '17 18:10 Brocco

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?

darinclark avatar Nov 01 '17 20:11 darinclark

And how does #7775 help with this?

vvolodin avatar Dec 29 '17 13:12 vvolodin

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.