Directive generated from project root directory is added to wrong module #12614
Labels
area: schematics/angular
freq1: low
Only reported by a handful of users who observe it rarely
severity5: regression
Milestone
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
It's a regression which occurs since Angular CLI version 6.0.0 (and still occurs with latest versions 6.2.5 and 7.0.0-rc.3).
There was no problem with Angular CLI 1.7.4 / Angular 5.
Repro steps
The log given by the failure
CREATE src/app/mod/dir.directive.spec.ts (212 bytes)
CREATE src/app/mod/dir.directive.ts (135 bytes)
[BUG]>> UPDATE src/app/app.module.ts (384 bytes)
Desired functionality
The directive should be added to src/app/mod/mod.module.ts, not to src/app/app.module.ts.
No problem when generating pipes and components. The bug only happens with directives, and when the command is run from the project root directory. When the command is run from the target module directory, it's ok.
The text was updated successfully, but these errors were encountered: