File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/angular-cli/blueprints/module Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,12 @@ module.exports = {
58
58
} ,
59
59
60
60
afterInstall : function ( options ) {
61
- options . entity . name = path . relative ( this . dynamicPath . appRoot , this . generatePath ) ;
62
- options . flat = false ;
61
+ // Note that `this.generatePath` already contains `this.dasherizedModuleName`
62
+ // So, the path will end like `name/name`,
63
+ // which is correct for `name.component.ts` created in module `name`
64
+ const componentPath = path . join ( this . generatePath , this . dasherizedModuleName ) ;
65
+ options . entity . name = path . relative ( this . dynamicPath . appRoot , componentPath ) ;
66
+ options . flat = true ;
63
67
options . route = false ;
64
68
options . inlineTemplate = false ;
65
69
options . inlineStyle = false ;
You can’t perform that action at this time.
0 commit comments