overflow-webapp/src/app/pages/pages.module.ts

70 lines
1.9 KiB
TypeScript
Raw Normal View History

2018-03-06 18:55:05 +09:00
import { NgModule, APP_INITIALIZER} from '@angular/core';
import { Title } from '@angular/platform-browser';
2018-01-26 21:30:25 +09:00
import { CommonModule } from '@angular/common';
import { PagesComponent } from './pages.component';
import { PagesRoutingModule } from './pages-routing.module';
2018-02-01 12:15:39 +09:00
import { SidebarComponent } from 'app/commons/component/sidebar/sidebar.component';
2018-01-29 18:16:30 +09:00
import { CovalentModule } from 'app/commons/ui/covalent/covalent.module';
import { MaterialModule } from 'app/commons/ui/material/material.module';
2018-02-01 12:15:39 +09:00
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';
2018-01-30 15:06:23 +09:00
import {
PerfectScrollbarModule,
PERFECT_SCROLLBAR_CONFIG,
PerfectScrollbarConfigInterface
} from 'ngx-perfect-scrollbar';
2018-03-02 17:43:13 +09:00
import { NotificationModule } from 'packages/notification/notification.module';
2018-01-30 15:06:23 +09:00
2018-03-06 18:55:05 +09:00
import {
L10nConfig,
L10nLoader,
LocalizationModule,
ProviderType
} from 'angular-l10n';
const l10nConfig: L10nConfig = {
translation: {
providers: [
{ type: ProviderType.Static, prefix: './assets/translations/of-' }
],
composedKeySeparator: '.',
missingValue: 'No key'
}
};
2018-01-30 15:06:23 +09:00
const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
suppressScrollX: true
};
2018-01-26 21:30:25 +09:00
@NgModule({
imports: [
CommonModule,
PagesRoutingModule,
2018-01-29 18:16:30 +09:00
CovalentModule,
2018-01-30 15:06:23 +09:00
MaterialModule,
PerfectScrollbarModule,
2018-03-02 17:43:13 +09:00
NotificationModule,
2018-03-06 18:55:05 +09:00
LocalizationModule.forChild(l10nConfig)
2018-01-26 21:30:25 +09:00
],
declarations: [
2018-01-29 18:16:30 +09:00
PagesComponent,
2018-01-29 18:53:30 +09:00
SidebarComponent,
2018-01-29 18:54:59 +09:00
HeaderComponent,
FooterComponent,
2018-01-30 15:06:23 +09:00
MenuItemComponent,
],
providers: [
{
provide: PERFECT_SCROLLBAR_CONFIG,
useValue: DEFAULT_PERFECT_SCROLLBAR_CONFIG
}
2018-01-31 18:55:31 +09:00
],
2018-01-26 21:30:25 +09:00
})
2018-03-06 18:55:05 +09:00
export class PagesModule {
constructor(public l10nLoader: L10nLoader) {
this.l10nLoader.load();
}
}