opt-cc/static/src/app/services/army-service/army.service.ts

20 lines
376 B
TypeScript

import {Injectable} from "@angular/core";
import {AppConfig} from "../../app.config";
import {Http} from "@angular/http";
@Injectable()
export class ArmyService {
constructor(private http: Http,
private config: AppConfig) {
}
getArmy() {
return this.http.get(this.config.apiUrl + this.config.apiOverviewPath)
.map(res => res.json());
}
}