Closed norbert-tasi closed 6 years ago
I don't fully understand your question
I have a lazy loaded module. for example BlogModule with routing. I have two other module, AdminModule, GuestModule and both module use loadChildren for the BlogModule. So is it possible to load a module for more than one modules as a submodule?
blog routes: [... path: '', component: BlogComponent, path: ':id', component: BlogViewComponent ... ]
admin routes: [... path: 'blog', loadChildren: '../blog/blog.module#BlogModule' ... ] guest routes: [... path: 'blog', loadChildren: '../blog/blog.module#BlogModule' ... ] app routes: [... {path: 'guest', loadChildren: './guest/guest.module#GuestModule'}, {path: 'admin', loadChildren: './guest/guest.module#AdminModule'} ... ] I'd like to get /guest/blog, /guest/blog/:id and /admin/blog, /admin/blog/:id paths, but it does not work.
Seems outside the scope of this repo
Hello,
Is it possible to reuse a module routing? I mean I have for example BlogModule(with routes blog, blog/:id) and I want to attach it for guest and admin users, so I'd like to add to /guest and /admin /guest/blog, /guest/blog/111 /admin/blog, /admin/blog/111 and why? For guests and admins the layout is different, but the nested blog should be the same, but now it is as if it replace the root. I have router-outlet in the app.component, guest.component and blog.component. maybe it is not allowed to nesting in three levels. /blog, /blog/111 are working.
Thank you, in advance