Merge branch 'master' of git.uio.no:u/erikhf/frm
[u/erikhf/frm.git] / src / components / app.ts
1 import {HTTP_PROVIDERS} from 'angular2/http';
2 import {Component, NgZone, NgIf, View, bootstrap, provide, ELEMENT_PROBE_PROVIDERS} from 'angular2/angular2';
3 import {Map} from './map/map';
4 import {Search} from "./search/search";
5 import {Sidebar} from "./sidebar/sidebar";
6
7
8 declare var System:any;
9
10 @Component(
11     {
12         selector: 'mou-app',
13         templateUrl: './components/app.html',
14         directives:[Map, Search, Sidebar, NgIf]
15     })
16
17
18 class App {
19     zone: Zone;
20
21     constructor(zone: NgZone){
22         this.zone = zone;
23     }
24     toplevel: boolean = false;
25
26     showtoplevel(){
27         let instance = this;
28         zone.run(() => {
29             this.setToplevelTrue();
30         });
31     }
32
33     setToplevelTrue(){
34         this.toplevel = true;
35     }
36 }
37
38 bootstrap(App,[HTTP_PROVIDERS, ELEMENT_PROBE_PROVIDERS]);