import { OverlayModule } from '@angular/cdk/overlay' ; import { CommonModule } from '@angular/common' ; import { ModuleWithProviders , NgModule } from '@angular/core' ; import { RouterModule } from '@angular/router' ; const HELPERS = [ ModalHelper , DrawerHelper ] ; import { BellOutline , DeleteOutline , InboxOutline , PlusOutline } from '@ant-design/icons-angular/icons' ; import { NzI18nModule } from 'ng-zorro-antd/i18n' ; import { NzIconService } from 'ng-zorro-antd/icon' ; import { DelonLocaleModule } from './locale/locale.module' ; import { DatePipe } from './pipes/date/date.pipe' ; import { KeysPipe } from './pipes/keys/keys.pipe' ; import { HTMLPipe } from './pipes/safe/html.pipe' ; import { URLPipe } from './pipes/safe/url.pipe' ; import { YNPipe } from './pipes/yn/yn.pipe' ; import { I18nPipe } from './services/i18n/i18n.pipe' ; const PIPES = [ DatePipe , KeysPipe , YNPipe , I18nPipe , HTMLPipe , URLPipe ] ; import { DrawerHelper } from './services/drawer/drawer.helper' ; import { ModalHelper } from './services/modal/modal.helper' ; import { ALAIN_SETTING_KEYS } from './services/settings/settings.service' ; const ICONS = [ BellOutline , DeleteOutline , PlusOutline , InboxOutline ] ; @ NgModule ( { imports : [ CommonModule , RouterModule , OverlayModule , NzI18nModule ] , declarations : [ ... PIPES ] , providers : [ { provide : ALAIN_SETTING_KEYS , useValue : { layout : 'layout' , user : 'user' , app : 'app' } } ] , exports : [ ... PIPES , DelonLocaleModule ] } ) export class AlainThemeModule { constructor ( iconSrv ) { iconSrv . addIcon ( ... ICONS ) ; } static forRoot ( ) { return { ngModule : AlainThemeModule , providers : [ ... HELPERS ] } ; } static forChild ( ) { return { ngModule : AlainThemeModule , providers : [ ... HELPERS ] } ; } }