import { ChangeDetectionStrategy , Component , Input } from '@angular/core' ; import { Router } from '@angular/router' ; import { FormatterService } from '@core/formatter.service' ; param event param products @ Component ( { changeDetection : ChangeDetectionStrategy . OnPush , selector : 'technical-origin-summary' , styleUrls : [ './origin-summary.component.scss' ] , templateUrl : './origin-summary.component.html' } ) export class OriginSummaryComponent { columnsToDisplay = [ 'catalog' , 'magnitude' , 'time' , 'depth' , 'status' , 'location' , 'source' ] ; @ Input ( ) event : any ; @ Input ( ) products : Array < any > ; router : Router ; constructor ( public formatterService , router ) { this . router = router ; } param str returns { Date } toDate ( str ) { return new Date ( str ) ; } }