mirror of
https://github.com/chsakell/aspnet-core-signalr-angular.git
synced 2025-12-22 17:27:48 +00:00
20 lines
536 B
TypeScript
20 lines
536 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
|
|
import { FeedService } from './shared/services/feed.service';
|
|
import { SignalRConnectionStatus } from './shared/interfaces';
|
|
|
|
@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));
|
|
}
|
|
} |