mirror of
https://github.com/chsakell/aspnet-core-signalr-angular.git
synced 2025-12-24 02:07:58 +00:00
add SignalR client service
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user