Cleaned up unused code
authorErik Haider Forsén <erikhf@ifi.uio.no>
Wed, 4 Nov 2015 13:41:49 +0000 (14:41 +0100)
committerErik Haider Forsén <erikhf@ifi.uio.no>
Wed, 4 Nov 2015 13:41:49 +0000 (14:41 +0100)
src/app/app.ts

index 4dac01b..6b01a9e 100644 (file)
@@ -1,38 +1,22 @@
 import {bootstrap, Component, CORE_DIRECTIVES} from 'angular2/angular2';
-import {Http, HTTP_PROVIDERS} from 'angular2/http';
 
 @Component({
     selector: 'hello-world',
     directives: [CORE_DIRECTIVES],
-    providers: [HTTP_PROVIDERS],
     template: `
         <h1>Hello World</h1>
         <p>This is just a sample template yeah!</p>
-        <div *ng-if="name">Name from DHIS: {{name}}</div>
-        <p>{{getName()}}</p>
+        <p>{{getApiURI()}}</p>
     `
 })
-class Hello {
-    http: Http;
-    constructor(http: Http){
-        this.http = http;
-    }
 
-    getName(){
-        return dhisAPI;
-    }
-/*
-    getAPI(){
-     return this.http.get('../manifest.webapp')
-         .map(res => res.json())
-         .subscribe(
-             data => console.log(data)
-         );
 
+class App {
+
+    getApiURI(){
+        return dhisAPI;
     }
-*/
 
-    public name: string;
 }
 
-bootstrap(Hello);
+bootstrap(App);