[apiService] created a service for getting the API URL
[u/erikhf/frm.git] / src / components / app.ts
1 import {HTTP_PROVIDERS} from 'angular2/http';
2 import {Component, View, bootstrap, provide} from 'angular2/angular2';
3 import {Map} from './map/map';
4 import {Search} from "./search/search";
5 import {Filter} from "./filter/filter";
6 import {DhisapiService} from "./dhisapi/dhisapiService";
7
8 declare var System:any;
9
10 @Component(
11     {
12         selector: 'mou-app',
13         templateUrl: './components/app.html',
14         directives:[Filter, Map, Search],
15         providers: [DhisapiService]
16     })
17
18
19 class App {
20     constructor(dhis: DhisapiService){
21         dhis.getApiURL(function(uri){
22             console.log(uri);
23         })
24     }
25
26 }
27
28 bootstrap(App,[HTTP_PROVIDERS,DhisapiService]);