does not generate stories when components come from an array in routing module
See original GitHub issueCurrent Behavior
nx g @nrwl/angular:stories project-name … –> creates only stories file for SimpleComponent
Expected Behavior
Stories should be created for HasRouteComponent and AlsoHasRouteComponent as well.
Steps to Reproduce
File: abc-routing.module.ts
const routes: Routes = [
// defines routes for the componts from variable "routedComponents"
]
@NgModule({
imports: [RouterModule.forChild(routes), NbDialogModule.forChild()],
exports: [RouterModule],
})
export class AbcRoutingModule {}
export const routedComponents = [
HasRouteComponent,
AlsoHasRouteComponent,
];
File: abc.module.ts
@NgModule({
declarations: [...routedComponents, SimpleComponent],
})
export class AbcModule {}
Environment
Node : 14.17.3
OS : Win10
npm : 8.3.0
nx : 13.1.4
"@nrwl/angular": "^13.1.4",
"@nrwl/cli": "13.1.4",
"@nrwl/cypress": "13.1.4",
"@nrwl/eslint-plugin-nx": "13.1.4",
"@nrwl/jest": "13.1.4",
"@nrwl/linter": "13.1.4",
"@nrwl/storybook": "^13.5.3",
"@nrwl/tao": "13.1.4",
"@nrwl/workspace": "13.1.4",
"typescript": "~4.3.5"
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Angular router seems to work but doesn't load component
The Angular router renders the loaded component there. Without it, your component class will be instantiated, but it cannot be rendered. Also, ...
Read more >A Complete Guide To Routing In Angular - Smashing Magazine
Throughout this tutorial, Ahmed Bouchefra introduces Angular Router and how you can use it to create client-side apps and Single Page Apps ...
Read more >Angular Dynamic Routing - Level Up Coding
A dirty workaround would be to create a fixed number of routes named: step1, step2, step3 and then load the component dynamically in...
Read more >Avoiding common confusions with modules in Angular
This is because there's no a-comp declared in the App module. If I want to use this component I need to import the...
Read more >Troubleshooting Angular routing - Medium
Firstly, we should create a routing-module: //app-routing.module.tsconst routes: Routes = [ { path: 'one', component: OneComponent },
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for reporting this!
I can reproduce this on latest, I’ll investigate 🙂
Hey @joaorodr84 I’ll go ahead and close this, because I’m pretty sure it’s fixed in the latest version of Nx. If the issue persists, please feel free to reopen!