-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
I have a case when I want to introduce a convention where all my dynamic modules/components will be in dynamic-modules folder. So instead of
const manifests: DynamicComponentManifest[] = [
{
componentId: 'message',
path: 'dynamic-message', // some globally-unique identifier, used internally by the router
loadChildren: './dynamic-modules/message/message.module#MessageModule',
},
{
componentId: 'dialog',
path: 'dialog',
loadChildren: './dynamic-modules/dialog/dialog.module#DialogModule',
},
];... wrote this:
const ids = ['feature1', 'feature2', 'feature3'];
export const manifests: DynamicComponentManifest[] = ids.map(id => {
const m: DynamicComponentManifest = {
componentId: id,
path: id,
loadChildren: `./dynamic-modules/${id}/${id}.module#${capitalizeFirstLetter(id)}Module`
};
return m;
});
// ... later in module imports:
DynamicComponentLoaderModule.forRoot(manifests),At build time I get an error:
ERROR in Cannot read property 'loadChildren' of undefined
Do you have any idea how to fix that?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels