feat: implement authentication flow and dynamic API configuration #5

This commit is contained in:
Marek Lesko
2025-07-31 17:41:18 +02:00
parent 42f84e878f
commit 0ab0402172
14 changed files with 152 additions and 52 deletions

View File

@@ -0,0 +1,19 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable, tap } from 'rxjs';
@Injectable({ providedIn: 'root' })
export class AppConfigService {
private config: any;
constructor(private readonly http: HttpClient) { }
loadConfig(): Observable<any> {
return this.http.get('/config.json')
.pipe(tap(data => this.config = data))
}
get setting() {
return this.config;
}
}