Revert "[apiService] created a service for getting the API URL"
[u/erikhf/frm.git] / src / components / filter / filter.ts
1 import {Component, View, CORE_DIRECTIVES} from 'angular2/angular2';
2 import {Headers, Http} from 'angular2/http';
3
4 @Component({
5     selector: 'mou-filter',
6     directives: [CORE_DIRECTIVES],
7     templateUrl: './components/filter/filter.html'
8 })
9
10 export class Filter {
11     result: Object;
12
13     // Example HTTP request
14
15     /*
16     constructor(http: Http) {
17         var authHeader = new Headers();
18         authHeader.append('Authorization', 'Basic YWRtaW46ZGlzdHJpY3Q=');
19         this.result = {organisationUnits:[]};
20         http.get(dhisAPI+'/api/organisationUnits?paging=false', {headers: authHeader})
21         //http.get('orgunit.json')
22             .map(res => res.json()).subscribe(
23             res => this.result = res,
24             error => this.logError(error)
25         );
26     }
27
28
29     logError(error){
30         console.error(error);
31     }
32
33     */
34 }