Files
aspnet-core-signalr-angular/app/shared/components/match.component.ts
2016-10-03 13:09:12 +03:00

22 lines
548 B
TypeScript

import { Component, OnInit, Input } from '@angular/core';
import { Match } from '../interfaces';
import { FeedService } from '../services/feed.service';
@Component({
selector: 'match',
templateUrl: 'app/shared/components/match.component.html'
})
export class MatchComponent implements OnInit {
@Input() match: Match;
constructor(private feedService: FeedService) { }
ngOnInit() { }
subscribe() {
console.log(this.match.Id);
this.feedService.subscribeToFeed(this.match.Id);
}
}