18 lines
404 B
TypeScript
18 lines
404 B
TypeScript
import {Injectable} from '@angular/core';
|
|
import {AppConfig} from '../../app.config';
|
|
import {HttpClient} from '@angular/common/http';
|
|
import {Army} from '../../models/model-interfaces';
|
|
|
|
|
|
@Injectable()
|
|
export class ArmyService {
|
|
|
|
constructor(private http: HttpClient,
|
|
private config: AppConfig) {
|
|
}
|
|
|
|
getArmies() {
|
|
return this.http.get<Army[]>(this.config.apiOverviewPath);
|
|
}
|
|
}
|