I have node.js
application that host an angular2 application. The whole application is using lazy loading like this:
export const routes: Routes = [
{
path: '', component: MyComponent,
children: [
{
path: 'lazy',
loadChildren: '../common/lazy/lazy.module#LazyModule'
}
}
]
The other team in my company is building another kind of software, but we want to reuse some of their modules. We don't want to share strictly code base, but rather host a module publicly and let it load by the application itself so we can do something like this
export const externalRoutes: Routes = [
{
path: 'externalModule',
loadChildren: 'http://mymodules.host/lazy.module#LazyModule'
}
]
Is is possible to load module in "live" application? I know there's something like dynamic component loader, but we need to load a module with plenty of components in it.