Skip to content
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

fix(generate): fix module component path if module is created in child folder #3066

Merged
merged 1 commit into from
Nov 10, 2016

Conversation

Meligy
Copy link
Contributor

@Meligy Meligy commented Nov 8, 2016

fixes #3063

@@ -58,7 +58,9 @@ module.exports = {
},

afterInstall: function (options) {
options.entity.name = path.join(this.dasherizedModuleName, this.dasherizedModuleName);
var componentPath = path.join(this.generatePath, this.dasherizedModuleName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're only going to have this.dasherizedModuleName once, then you need to turn options.flat to false. The default for components is that they're in their own directory. I'd suggest using options.flat = false. And once you make that change you will also need to update your tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Brocco the dasherizedModuleName is already included in generatePath, so it was still there twice.

However, I still changed it to use options.flat = false;, without using this.dasherizedModuleName.

The outcome is the same though. Not sure why I need to change the test.

@Meligy Meligy force-pushed the fix/generate-module-child-folder branch from b91fffe to 19753ce Compare November 8, 2016 20:47
@hansl hansl merged commit 38d5f2c into angular:master Nov 10, 2016
MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this pull request Feb 9, 2017
@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 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid path when generating a module inside a sub directory
4 participants