Skip to content

Commit

Permalink
feat: add api config loader
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammad-haji committed Aug 15, 2018
1 parent bbfe42a commit 6c668c2
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/app/@core/services/api/api-config-reader.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Created by Mohammad.hajiaghazadeh on 8/15/2018
*/
import {Injectable} from "@angular/core";
import {HttpClient} from "@angular/common/http";
import {loadJSON} from '../../utils/load-sync';

@Injectable()
export class ApiConfigReaderService {
ngxApiConfig: any;

constructor(private httpClient: HttpClient) {
this.ngxApiConfig = loadJSON('./assets/config/api/api-config.json');
}

getConfig() {
return this.ngxApiConfig;
}
}

0 comments on commit 6c668c2

Please sign in to comment.