Config and login
Change-Id: I81ffb9b8097620cb7870beaf1b1b315945eebec0
diff --git a/src/app/hello.ts b/src/app/hello.ts
index 9f42916..b67e7f6 100644
--- a/src/app/hello.ts
+++ b/src/app/hello.ts
@@ -1,13 +1,33 @@
-import {Component} from '@angular/core';
+/// <reference path="../../typings/index.d.ts"/>
+import {Component, OnInit} from '@angular/core';
+import {NgFor} from '@angular/common';
+import {StyleConfig} from './config/style.config';
+import {CoreService} from './services/rest/core.service';
@Component({
- selector: 'fountain-app',
- template: require('./hello.html')
+ selector: 'xos-app',
+ template: require('./hello.html'),
+ providers: [CoreService],
})
export class HelloComponent {
- public hello: string;
- constructor() {
- this.hello = 'Hello World!';
+ // declare class properties
+ public hello: string;
+ public endpoints: any[];
+
+ constructor(private coreService: CoreService) {
+ this.hello = `Hello ${StyleConfig.projectName}!`;
+ this.endpoints = [];
+ }
+
+ ngOnInit() {
+ console.log('on init');
+ this.coreService.getCoreEndpoints()
+ .subscribe(
+ endpoints => {
+ this.endpoints = endpoints
+ },
+ err => console.log
+ )
}
}