Files
aspnet-core-signalr-angular/app/app.component.ts
2016-09-27 15:43:30 +03:00

19 lines
480 B
TypeScript

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