add SignalR client service

This commit is contained in:
chsakell
2016-09-27 15:43:30 +03:00
parent cd3a4001e6
commit 1ef3f04731
6 changed files with 159 additions and 10 deletions

View File

@@ -1,6 +1,19 @@
import { Component } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { FeedService, ConnectionState } from './shared/feed.service'
@Component({
selector: 'my-app',
templateUrl: 'app/app.component.html'
templateUrl: 'app/app.component.html',
providers: [FeedService]
})
export class AppComponent { }
export class AppComponent implements OnInit {
constructor(private service: FeedService) { }
ngOnInit() {
this.service.start(true).subscribe(
null,
error => console.log('Error on init: ' + error));
}
}