We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07e96ea commit 99a9002Copy full SHA for 99a9002
packages/angular-cli/blueprints/module/index.js
@@ -58,8 +58,12 @@ module.exports = {
58
},
59
60
afterInstall: function (options) {
61
- options.entity.name = path.relative(this.dynamicPath.appRoot, this.generatePath);
62
- options.flat = false;
+ // Note that `this.generatePath` already contains `this.dasherizedModuleName`
+ // So, the path will end like `name/name`,
63
+ // which is correct for `name.component.ts` created in module `name`
64
+ var componentPath = path.join(this.generatePath, this.dasherizedModuleName);
65
+ options.entity.name = path.relative(this.dynamicPath.appRoot, componentPath);
66
+ options.flat = true;
67
options.route = false;
68
options.inlineTemplate = false;
69
options.inlineStyle = false;
0 commit comments