import { NgModule, ModuleWithProviders } from '@angular/core'; import { CommonModule } from '@angular/common'; const COMPONENTS = []; const DIALOGS = []; const DIRECTIVES = []; const PIPES = []; const SERVICES = []; @NgModule({ imports: [CommonModule], exports: [...COMPONENTS, ...DIRECTIVES, ...PIPES], declarations: [...COMPONENTS, ...DIALOGS, ...DIRECTIVES, ...PIPES], entryComponents: [...DIALOGS] }) export class UCapEnviromentsModule { public static forRoot(): ModuleWithProviders { return { ngModule: UCapEnviromentsModule, providers: [...SERVICES] }; } }