mirror of
https://github.com/chsakell/aspnet-core-signalr-angular.git
synced 2025-12-22 17:27:48 +00:00
added chat table - initial
This commit is contained in:
@@ -9,6 +9,7 @@ import { DataService } from './shared/services/data.service';
|
|||||||
import { HomeComponent } from './home/home.component';
|
import { HomeComponent } from './home/home.component';
|
||||||
import { HighlightDirective } from './shared/directives/highlight.directive';
|
import { HighlightDirective } from './shared/directives/highlight.directive';
|
||||||
import { MatchComponent } from './shared/components/match.component';
|
import { MatchComponent } from './shared/components/match.component';
|
||||||
|
import { ChatComponent } from './shared/components/chat.component';
|
||||||
import { routing } from './app.routes';
|
import { routing } from './app.routes';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@@ -20,6 +21,7 @@ import { routing } from './app.routes';
|
|||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
|
ChatComponent,
|
||||||
HomeComponent,
|
HomeComponent,
|
||||||
HighlightDirective,
|
HighlightDirective,
|
||||||
MatchComponent
|
MatchComponent
|
||||||
|
|||||||
@@ -2,4 +2,7 @@
|
|||||||
<div class="col-md-4" *ngFor="let match of matches">
|
<div class="col-md-4" *ngFor="let match of matches">
|
||||||
<match [match]="match"></match>
|
<match [match]="match"></match>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<chat [matches]="matches"></chat>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
38
app/shared/components/chat.component.html
Normal file
38
app/shared/components/chat.component.html
Normal 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>
|
||||||
16
app/shared/components/chat.component.ts
Normal file
16
app/shared/components/chat.component.ts
Normal 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() { }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user