Working on config providor.

This commit is contained in:
William Welling
2017-03-24 16:57:11 -05:00
parent 415a52f011
commit 9b23393121
8 changed files with 15 additions and 20 deletions

View File

@@ -21,7 +21,7 @@ import { effects } from '../../app/app.effects';
// see https://github.com/angular/angular/pull/12322
import { Meta } from '../angular2-meta';
import { globalConfig } from '../../config';
import { GLOBAL_CONFIG, config } from '../../config';
export function createTranslateLoader(http: Http) {
return new TranslateStaticLoader(http, './assets/i18n', '.json');
@@ -63,6 +63,8 @@ export const UNIVERSAL_KEY = 'UNIVERSAL_CACHE';
effects
],
providers: [
{ provide: GLOBAL_CONFIG, useValue: config },
{ provide: 'res', useFactory: getResponse },
{ provide: 'isBrowser', useValue: isBrowser },
{ provide: 'isNode', useValue: isNode },
@@ -71,9 +73,8 @@ export const UNIVERSAL_KEY = 'UNIVERSAL_CACHE';
{ provide: 'LRU', useFactory: getLRU, deps: [] },
Meta,
Meta
globalConfig
]
})
export class MainModule {