Newer
Older
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {Game} from 'src/app/models/game';
@Component({
selector: 'app-games',
templateUrl: './games.component.html',
styleUrls: ['./games.component.css']
})
export class GamesComponent implements OnInit {
@Input() games!: Array<Game>;
@Output() reloadEvent: EventEmitter<any> = new EventEmitter();
columnsToDisplay: string[] = [
"name", "homeTeam", "awayTeam", "score"
];
triggerRefreshEvent(): void {
this.reloadEvent.emit(null);
}