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

19 lines
363 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.apiOverviewPath)
.map(res => res.json());
}
}