This commit is contained in:
snoop 2018-03-08 14:39:15 +09:00
commit 15e507de3b
2 changed files with 25 additions and 16 deletions

View File

@ -40,6 +40,10 @@ export function initL10n(l10nLoader: L10nLoader): Function {
LocalizationModule.forRoot(l10nConfig), LocalizationModule.forRoot(l10nConfig),
LocaleValidationModule.forRoot() LocaleValidationModule.forRoot()
], ],
exports: [
LocalizationModule,
LocaleValidationModule,
],
providers: [ providers: [
Title, Title,
{ {

View File

@ -16,22 +16,26 @@ import {
} from 'ngx-perfect-scrollbar'; } from 'ngx-perfect-scrollbar';
import { NotificationModule } from 'packages/notification/notification.module'; import { NotificationModule } from 'packages/notification/notification.module';
// import {
// L10nConfig,
// L10nLoader,
// LocalizationModule,
// ProviderType
// } from 'angular-l10n';
import { import {
L10nConfig,
L10nLoader,
LocalizationModule, LocalizationModule,
ProviderType
} from 'angular-l10n'; } from 'angular-l10n';
const l10nConfig: L10nConfig = { // const l10nConfig: L10nConfig = {
translation: { // translation: {
providers: [ // providers: [
{ type: ProviderType.Static, prefix: './assets/translations/of-' } // { type: ProviderType.Static, prefix: './assets/translations/of-' }
], // ],
composedKeySeparator: '.', // composedKeySeparator: '.',
missingValue: 'No key' // missingValue: 'No key'
} // }
}; // };
const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
suppressScrollX: true suppressScrollX: true
@ -46,7 +50,8 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
MaterialModule, MaterialModule,
PerfectScrollbarModule, PerfectScrollbarModule,
NotificationModule, NotificationModule,
LocalizationModule.forChild(l10nConfig) LocalizationModule,
// LocalizationModule.forChild(l10nConfig)
], ],
declarations: [ declarations: [
PagesComponent, PagesComponent,
@ -63,7 +68,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
], ],
}) })
export class PagesModule { export class PagesModule {
constructor(public l10nLoader: L10nLoader) { // constructor(public l10nLoader: L10nLoader) {
this.l10nLoader.load(); // this.l10nLoader.load();
} // }
} }