update match scores

This commit is contained in:
chsakell
2016-09-30 16:01:17 +03:00
parent 8e6c0efe48
commit b0040ac178
12 changed files with 173 additions and 28 deletions

View File

@@ -41,7 +41,16 @@ export class HomeComponent implements OnInit {
this.dataService.getMatches()
.subscribe((res: Match[]) => {
self.matches = res;
console.log(self.matches);
self.feedService.updateMatch.subscribe(
match => {
for(var i=0; i< self.matches.length; i++)
{
if (self.matches[i].Id === match.Id) {
self.matches[i] = match;
}
}
}
);
},
error => {
console.log(error);