import { ChangeDetectionStrategy , Component } from '@angular/core' ; import { FormGroup } from '@angular/forms' ; import { Event } from '@medium-stories/entities' ; import { eventFormConfig } from './event-new.form' ; @ Component ( { selector : 'medium-stories-event-new' , templateUrl : './event-new.component.html' , styleUrls : [ './event-new.component.scss' ] , changeDetection : ChangeDetectionStrategy . OnPush } ) export class EventNewComponent { /**
     * Form
     */ form = new FormGroup ( { } ) ; /**
     * Form config
     */ formConfig = eventFormConfig ; param data onChanged < T extends object = Partial < Event > > ( data ) { console . log ( data ) ; } /**
     * On submit
     */ onSubmit ( ) { this . form . markAllAsTouched ( ) ; } }