You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Import Module while generating Submodule with --routing uses RoutingModule #6533
changed the title [-]Import Module while generating uses wrong module[/-][+]Import Module while generating Submodule with --routing uses RoutingModule[/+]on Jun 1, 2017
Well in my case, it was not this typo, it was because I was induced in error by the issue (indicated in the changelog #5377) this new feature solved, where it's written without a = : ng g module test -m app.module
As ng g module test -m throws and ng g module test -m badpath/app.module throws too, I thought it was an alternative syntax I didn't know.
Shouldn't the CLI throws in case of typos instead of doing something weird ?
Activity
[-]Import Module while generating uses wrong module[/-][+]Import Module while generating Submodule with --routing uses RoutingModule[/+]web-dave commentedon Jun 1, 2017
It seems to happen only if I generate a module with
--routingcyrilletuzi commentedon Jun 1, 2017
I confirm this issue.
sumitarora commentedon Jun 1, 2017
@web-dave @cyrilletuzi It's work fine just 1 typo
ng g module foo --routing -m=app.moduleinstead ofng g module foo --routing -m=app.modulescyrilletuzi commentedon Jun 1, 2017
Well in my case, it was not this typo, it was because I was induced in error by the issue (indicated in the changelog #5377) this new feature solved, where it's written without a
=:ng g module test -m app.moduleAs
ng g module test -mthrows andng g module test -m badpath/app.modulethrows too, I thought it was an alternative syntax I didn't know.Shouldn't the CLI throws in case of typos instead of doing something weird ?
web-dave commentedon Jun 2, 2017
My Super hero power: Typos!!
But confusing, cause without --routing it works.
sumitarora commentedon Jun 6, 2017
@cyrilletuzi It does work as expected. I checked it again. Do you have steps to replicate the exact issue?
cyrilletuzi commentedon Jun 7, 2017
without
=AppModuleimportsTestRoutingModuleinstead ofTestModuleclydin commentedon Jun 7, 2017
This appears to be the suspect code block: https://github.com/angular/angular-cli/blob/master/packages/%40angular/cli/blueprints/module/index.ts#L127
cyrilletuzi commentedon Jun 29, 2017
Now this issue happens with the normal and official commands :
results in
TestRoutingModuleimported inAppModuleinstead ofTestModule.That's a major issue.
cyrilletuzi commentedon Jul 2, 2017
Still here in cli 1.2.0. Submitted a PR.
cyrilletuzi commentedon Jul 20, 2017
Can someone review my PR ? It's a really annoying issue.
shairez commentedon Aug 7, 2017
@Brocco or @filipesilva
Seems like there is a PR for this issue, have you got a chance to review it yet?
#goodnessSquad
hansl commentedon Aug 17, 2017
Fixed in Schematics.
doggy8088 commentedon Aug 18, 2017
@hansl I tested. It works. Thank you! But the
ng g mno longer working. It can only be useng g moduleto generate a new module. Is it a known issue?Brocco commentedon Aug 21, 2017
@doggy8088 It is a known issue that I am actively working on.
angular-automatic-lock-bot commentedon Sep 7, 2019
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.