import { NgModule, APP_INITIALIZER} from '@angular/core'; import { Title } from '@angular/platform-browser'; import { CommonModule } from '@angular/common'; import { PagesComponent } from './pages.component'; import { PagesRoutingModule } from './pages-routing.module'; import { SidebarComponent } from 'app/commons/component/sidebar/sidebar.component'; import { CovalentModule } from 'app/commons/ui/covalent/covalent.module'; import { MaterialModule } from 'app/commons/ui/material/material.module'; import { HeaderComponent } from 'app/commons/component/header/header.component'; import { FooterComponent } from 'app/commons/component/footer/footer.component'; import { MenuItemComponent } from 'app/commons/component/menu-item/menu-item.component'; import { PerfectScrollbarModule, PERFECT_SCROLLBAR_CONFIG, PerfectScrollbarConfigInterface } from 'ngx-perfect-scrollbar'; import { NotificationModule } from 'packages/notification/notification.module'; import { L10nConfig, L10nLoader, LocalizationModule, ProviderType } from 'angular-l10n'; const l10nConfig: L10nConfig = { translation: { providers: [ { type: ProviderType.Static, prefix: './assets/translations/of-' } ], composedKeySeparator: '.', missingValue: 'No key' } }; const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { suppressScrollX: true }; @NgModule({ imports: [ CommonModule, PagesRoutingModule, CovalentModule, MaterialModule, PerfectScrollbarModule, NotificationModule, LocalizationModule.forChild(l10nConfig) ], declarations: [ PagesComponent, SidebarComponent, HeaderComponent, FooterComponent, MenuItemComponent, ], providers: [ { provide: PERFECT_SCROLLBAR_CONFIG, useValue: DEFAULT_PERFECT_SCROLLBAR_CONFIG } ], }) export class PagesModule { constructor(public l10nLoader: L10nLoader) { this.l10nLoader.load(); } }