import { Component , Input , OnInit } from '@angular/core' ; import { FormGroup } from '@angular/forms' ; @ Component ( { selector : 'cmdb-type-preview' , templateUrl : './type-preview.component.html' , styleUrls : [ './type-preview.component.scss' ] } ) export class TypePreviewComponent implements OnInit { private fileForm : FormGroup ; public filterTypes : string = '' ; ngOnInit ( ) { } @ Input ( 'data' ) public set data ( value ) { this . fileForm = value ; } public get data ( ) { return this . fileForm ; } public removeFromFile ( index ) { this . data . get ( 'file' ) . value . splice ( index , 1 ) ; } handleChange ( evt ) { this . data . get ( 'action' ) . setValue ( evt . target . value ) ; } }