added chat table - initial

This commit is contained in:
chsakell
2016-10-03 15:26:25 +03:00
parent 4dc031cf8b
commit df79d53626
4 changed files with 59 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ import { DataService } from './shared/services/data.service';
import { HomeComponent } from './home/home.component';
import { HighlightDirective } from './shared/directives/highlight.directive';
import { MatchComponent } from './shared/components/match.component';
import { ChatComponent } from './shared/components/chat.component';
import { routing } from './app.routes';
@NgModule({
@@ -20,6 +21,7 @@ import { routing } from './app.routes';
],
declarations: [
AppComponent,
ChatComponent,
HomeComponent,
HighlightDirective,
MatchComponent

View File

@@ -2,4 +2,7 @@
<div class="col-md-4" *ngFor="let match of matches">
<match [match]="match"></match>
</div>
<div class="col-md-4">
<chat [matches]="matches"></chat>
</div>
</div>

View File

@@ -0,0 +1,38 @@
<table class="table table-bordered box">
<thead>
<tr>
<th>ID</th>
<th>Match</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let match of matches">
<td><span class="teamName">{{match.Id}}</span></td>
<td><span class="teamScore"> {{match.Host}} vs {{match.Guest}} </span></td>
</tr>
<!--<tr>
<td colspan="2">
<div class="feed-table">
<table class="table table-striped">
<thead>
<tr>
<th></th>
<th>Update</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let feed of match.Feeds" feedHighlight>
<td>
<span class="feed-time">{{feed.CreatedAt | date:'shortTime' }}</span>
</td>
<td class="filterable-cell">
<span class="feed-update"> {{feed.Description}} </span>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>-->
</tbody>
</table>

View File

@@ -0,0 +1,16 @@
import { Component, OnInit, Input } from '@angular/core';
import { Match } from '../interfaces';
@Component({
selector: 'chat',
templateUrl: 'app/shared/components/chat.component.html'
})
export class ChatComponent implements OnInit {
@Input() matches: Match[];
constructor() { }
ngOnInit() { }
}