Registering the Custom Widget
An Angular application may load different modules, sometime lazy loaded, depending on the project size, organization or complexity.
Each module that registers Custom widgets needs to register the widget and its (optional) configurator widget through the GeneCustomWidgetFactoryService.
The Custom Widget sample below shows how to do it.
@NgModule({ declarations : [SampleWidgetComponent, SampleWidgetConfiguratorComponent], entryComponents : [SampleWidgetComponent, SampleWidgetConfiguratorComponent], providers: [SampleWidgetService], imports : [ CommonModule, FormsModule, ReactiveFormsModule, ClrInputModule, // Platform Modules dependencies GeneCommonUiModule, GeneLoadingOverlayModul ] }) export class SampleWidgetModule { constructor(customWidgetFactory: GeneCustomWidgetFactoryService) { // Register my component Manifest into the custom Widget factory, so // it is accessible through the wizard customWidgetFactory.registerWidget(SampleWidgetComponent.MANIFEST, SampleWidgetComponent, SampleWidgetConfiguratorComponent); } }