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
Creating a module with --route & --routing creates duplicated & errored code #17139
The issue is caused by the schematics that create a module
Is this a regression?
I do not know, I have never tried it before
Description
when running a command to create a module with --route & --routing, the code gets duplicated : there are routes in the *.module.ts along with the *-routing.module.ts
🔬 Minimal Reproduction
I didn't manage to create a stackblitz, but here are the commands to reproduce it locally.
npx create-nx-workspace@latest workspace
cd workspace
ng add @nrwl/angular --defaults
ng g @nrwl/angular:application app --style scss --routing true --prefix app
ng g m home --route home --module app.module.ts --routing true --project app
@alan-agius4 I have followed the steps again and here is the result :
If I remove the routing flag :
It seems that the second (semi-colon) and third (schematics config not applied) issues are with my own repository, I will look into that myself ! I am removing them from my original issue
Activity
alan-agius4 commentedon Mar 3, 2020
Hi @Maryannah, I tried this locally and while the second part is a bug, I was unable to reproduce the first issue with the steps provided.
The resulted module looks like the below without the
routingflagMaryannah commentedon Mar 3, 2020
@alan-agius4 I have followed the steps again and here is the result :
If I remove the routing flag :
It seems that the second (semi-colon) and third (schematics config not applied) issues are with my own repository, I will look into that myself ! I am removing them from my original issue
alan-agius4 commentedon Mar 3, 2020
Hi @Maryannah, can you please update the issue title and description accordingly as it seems that you deleted the details of the actual bug?
Thanks.
Maryannah commentedon Mar 3, 2020
@alan-agius4 I have removed what is related to my own repository and kept the issue as it was found originally.
I am adding a screenshot to picture it if needed, but that's all the issue, the duplication of the routes !
fix(@schematics/angular): prevent importing `RouterModule` parallel t…
fix(@schematics/angular): prevent importing `RouterModule` parallel t…
fix(@schematics/angular): prevent importing `RouterModule` parallel t…
fix(@schematics/angular): prevent importing `RouterModule` parallel t…
angular-automatic-lock-bot commentedon Aug 6, 2022
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.