]> git.uio.no Git - u/erikhf/frm.git/blame - src/components/dhisapi/dhisapiService.ts
Merge branch 'master' into search
[u/erikhf/frm.git] / src / components / dhisapi / dhisapiService.ts
CommitLineData
aca80f6a
EHF
1import {Injectable} from 'angular2/angular2';
2import {Http} from 'angular2/http';
3
4@Injectable()
5export class DhisapiService {
6 private http: Http;
7
8 constructor(http: Http){
9 this.http = http;
10 }
11
12 getApiURL = function(callback){
13 this.http.get('../manifest.webapp')
14 .map(res => res.json())
15 .map(res => res.activities.dhis.href)
16 .subscribe( res => callback(res));
17 }
18}