diff --git a/projects/common/src/fm/shared/app.config.ts b/projects/common/src/fm/shared/app.config.ts index 57fbc35..8a8104a 100644 --- a/projects/common/src/fm/shared/app.config.ts +++ b/projects/common/src/fm/shared/app.config.ts @@ -1,4 +1,5 @@ import {Inject, Injectable} from '@angular/core'; +import { Location } from '@angular/common'; import {HttpClient, HttpXhrBackend} from '@angular/common/http'; import {Observable} from 'rxjs'; @@ -8,7 +9,7 @@ export class AppConfig { private config: Object = null; private httpClient: HttpClient; - constructor(xhrBackend: HttpXhrBackend) { + constructor(xhrBackend: HttpXhrBackend,private location:Location) { this.httpClient = new HttpClient(xhrBackend); this.config = null; } @@ -21,7 +22,7 @@ export class AppConfig { } public load(): Promise { - return this.httpClient.get('/configuration.json') + return this.httpClient.get(this.location.prepareExternalUrl('/configuration.json')) .toPromise() .then(data => { this.config = data;