add hub server methods

This commit is contained in:
chsakell
2016-10-03 09:24:41 +03:00
parent b0040ac178
commit ac92ee2d30
5 changed files with 32 additions and 4 deletions

View File

@@ -19,7 +19,7 @@
<span class="label label-success">{{match.Type}}</span>
</td>
<td>
<button type="button" class="btn btn-default btn-xs">
<button type="button" class="btn btn-default btn-xs" (click)="subscribe()">
Subscribe to feed
</button>
</td>

View File

@@ -1,6 +1,7 @@
import { Component, OnInit, Input } from '@angular/core';
import { Match } from '../interfaces';
import { FeedService } from '../services/feed.service';
@Component({
selector: 'match',
@@ -10,7 +11,12 @@ export class MatchComponent implements OnInit {
@Input() match: Match;
constructor() { }
constructor(private feedService: FeedService) { }
ngOnInit() { }
subscribe() {
console.log(this.match.Id);
this.feedService.subscribeToFeed(this.match.Id);
}
}