import { ChangeDetectionStrategy , ChangeDetectorRef , Component , OnDestroy , OnInit , ViewChild } from '@angular/core' ; import { FieldWrapperComponent } from '@medium-stories/dynamic-forms' ; @ Component ( { selector : 'medium-stories-event-new-field-wrapper' , templateUrl : './event-new-field-wrapper.component.html' , styleUrls : [ './event-new-field-wrapper.component.scss' ] , changeDetection : ChangeDetectionStrategy . OnPush } ) export class EventNewFieldWrapperComponent extends FieldWrapperComponent implements OnDestroy , OnInit { constructor ( protected changeDetectorRef ) { super ( changeDetectorRef ) ; } ngOnDestroy ( ) { super . ngOnDestroy ( ) ; } ngOnInit ( ) { super . ngOnInit ( ) ; } getErrorLabel ( error ) { return error ? `events.new.validators.${ this . field . key }.${ error }` : null ; } }