import { ChangeDetectionStrategy , Component , OnInit , Input } from '@angular/core' ; param station @ Component ( { changeDetection : ChangeDetectionStrategy . OnPush , selector : 'shared-station' , styleUrls : [ './station.component.scss' ] , templateUrl : './station.component.html' } ) export class StationComponent implements OnInit { @ Input ( ) channels = true ; readonly channelsColumns = [ 'name' , 'pga' , 'pgv' , 'psa03' , 'psa10' , 'psa30' ] ; @ Input ( ) expanded = false ; @ Input ( ) station : any ; ngOnInit ( ) { if ( this . station === null ) { return ; } if ( typeof this . station === 'string' ) { this . station = JSON . parse ( this . station ) ; } } }