I want to build a generic module that I can pass some config to customize it. For example, in the root module I want to have something like
@NgModule({
imports: [
moduleFactory(config1),
moduleFactory(config2),
moduleFactory(config3)
],
})
export class AppModule { }
The moduleFactory
will return a module with routes that will be constructed based on configx
objects. These modules will provide some views that will show customized content based on the config object. How can I do that?