import { ChangeDetectionStrategy , Component , Input } from '@angular/core' ; param contributors { any } param event { any } param product { any } @ Component ( { changeDetection : ChangeDetectionStrategy . OnPush , selector : 'product-page-header' , styleUrls : [ './header.component.scss' ] , templateUrl : './header.component.html' } ) export class HeaderComponent { @ Input ( ) contributors : any ; @ Input ( ) event : any ; @ Input ( ) product : any ; @ Input ( ) showAllProducts : boolean ; @ Input ( ) showVersion : boolean ; param event { any } param product { any } isPreferred ( event , product ) { try { return product . id === event . properties . products [ product . type ] [ 0 ] . id ; } catch ( e ) { return false ; } } }