Lazy Loaded routes are not showing in documentation:

OS: Windows
Node: 12.8.0
npm: 6.10.2
Angular CLI: 9.1.0
Tried both
Here is part of my app-routing.module.ts
// src/app/app-routing.module.ts
const routes: Routes = [
{
path: 'module1',
loadChildren: () =>
import('./modules/module1/module1.module').then((m) => m.Module1Module),
}
]
And for each module, such as Module1:
// src/app/modules/module1/module1-routing.module.ts
const routes: Routes = [
{
path: '',
component: Module1Component,
data: {
...
},
canActivate: [AuthGuard],
children: [
{
path: '',
redirectTo: 'list'
},
{
path: 'list',
pathMatch: 'full',
component: ListComponent,
data: {
...
},
},
{
path: ':id',
component: DetailsComponent,
data: {
...
},
},
],
},
];
Error during generation of routes JSON file, maybe a trailing comma or an external variable inside one route.

It should document all routes in the corresponding section.
--routingng g m module --routing)npx compodoc -p tsconfig.json)Several times, but all of them have been closed due to inactivity
I haven't found a solution yet.
I'm having the same issue. It feels like the routes don't support the new syntax for lazy loading.
If that's the case, is there anyone looking into this?
I offer myself to work on this, but I am available starting next week.
I too need this bug fixed. Thanks @diegovincent to get started.
same problem here.
Same Problem here - I upgraded to Angular 9 - now no routes will be included into the documentation at all
I get an error with asm.js (don't know, if it is related)
(node:14104) V8: C:\repos\myProject\webapp\node_modules\viz.js\viz.js:33 Invalid asm.js: Function definition doesn't match use
(Usenode --trace-warnings ...to show where the warning was created)
I have the same problem no routes presented.

But even when I remove all lazy loading logic the same error is shown:

I'm using this dependencies:

getting this error as well on angular 10.1.1 and compodoc 1.1.11
is there any progress on this?
Hi there. I getting the same issue and what i see.
TL;DR; globally installed compodoc, seems works well (for me)
devDependency
npm run compodoc

All works without router parsing errors !!! and documentation looks good
compodoc -p tsconfig.json src

So it seems some shared local dependency or special working mode of compodoc as devDependency adds side effect
Hi,
I've just found a workaround that works for me on compodoc 1.1.11. Just replace
(m) => m.MyModule
by
m => m.MyModule
I think the regex need some improvement here : https://github.com/compodoc/compodoc/blob/8c509f0c130fb7cfc63f470a16e2fce73ddca092/src/utils/router-parser.util.ts#L25
I was always using the global package, still it did not work.
But I can confirm the workaround posted by @headonkeyboard
I was always using the global package, still it did not work.
But I can confirm the workaround posted by @headonkeyboard
Same here, but its not a correct solution because when u build with --prod, got an error
Routes parsing error, maybe a trailing comma or an external variable ?
Same for me as @rodmax
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. Please file a new issue if you are encountering a similar or related problem. Thank you for your contributions.
I've tried the workaround by @headonkeyboard , but it's not working for me
Angular version: 11.2.0
Compodoc version: 1.1.11
Most helpful comment
Hi,
I've just found a workaround that works for me on compodoc 1.1.11. Just replace
(m) => m.MyModuleby
m => m.MyModuleI think the regex need some improvement here : https://github.com/compodoc/compodoc/blob/8c509f0c130fb7cfc63f470a16e2fce73ddca092/src/utils/router-parser.util.ts#L25