Update to Angular v19 and fixing (#3)
Reviewed-on: #3 Co-authored-by: sandre <perso@sebastienandre.com> Co-committed-by: sandre <perso@sebastienandre.com>
This commit was merged in pull request #3.
This commit is contained in:
@@ -1,26 +1,25 @@
|
||||
import { HttpHeaders } from '@angular/common/http';
|
||||
import { HttpHeaders } from "@angular/common/http";
|
||||
|
||||
import { ConfigurationHelper } from './configuration-helper';
|
||||
import { ServiceCacheApi } from './service-cache-api.service';
|
||||
import { ConfigurationHelper } from "./configuration-helper";
|
||||
import { ServiceCacheApi } from "./service-cache-api.service";
|
||||
|
||||
export class BaseService {
|
||||
protected headers: HttpHeaders;
|
||||
protected apiUrl: string;
|
||||
protected serviceCacheApi : ServiceCacheApi;
|
||||
protected headers: HttpHeaders;
|
||||
protected apiUrl: string;
|
||||
protected serviceCacheApi: ServiceCacheApi;
|
||||
|
||||
constructor() {
|
||||
ConfigurationHelper.settings.subscribe(settings =>
|
||||
{
|
||||
if (settings != null) {
|
||||
let tmpApiUrl : string = settings.apiUrl;
|
||||
|
||||
this.headers = new HttpHeaders({
|
||||
'Access-Control-Allow-Origin': tmpApiUrl
|
||||
});
|
||||
this.apiUrl = tmpApiUrl + '/api';
|
||||
}
|
||||
constructor() {
|
||||
ConfigurationHelper.settings.subscribe((settings) => {
|
||||
if (settings != null) {
|
||||
let tmpApiUrl: string = settings.apiUrl;
|
||||
|
||||
this.headers = new HttpHeaders({
|
||||
"Access-Control-Allow-Origin": tmpApiUrl,
|
||||
});
|
||||
this.apiUrl = tmpApiUrl + "/api";
|
||||
}
|
||||
});
|
||||
|
||||
this.serviceCacheApi = new ServiceCacheApi();
|
||||
}
|
||||
this.serviceCacheApi = new ServiceCacheApi();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user