Newer
Older
import { Injectable } from "@angular/core";
import { HttpClient } from '@angular/common/http';
@Injectable()
export class AppConfiguration {
fdpurl: string;
fdpemail: string;
fdppassword: string;
constructor(private httpClient: HttpClient){};
public ensureInit(): Promise<any> {
return new Promise((r, e) => {
this.httpClient.get("assets/conf/fdpsetting.json")
.subscribe(
(content: AppConfiguration) => {
Object.assign(this, content);
r(this);
},
reason => e(reason));
});
};
}