import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

@Injectable()
export class ConfigService {

    settings:   any;

    constructor(
        public httpClient: HttpClient
    ) {

    }

    load(): Promise<any> {
        return this.httpClient.get('assets/data/config.json')
            .toPromise()
            .then(data => {
                this.settings = data;
                return data;
            })
    }
}