import { Component, OnInit, Input } from '@angular/core';
import { environment } from '../../../../environments/environment.dev';
@Component({
  selector: 'app-form-input-multiple',
  templateUrl: './form-input-multiple.component.html',
  styleUrls: ['./form-input-multiple.component.css']
})
export class FormInputMultipleComponent implements OnInit {
  @Input() control: any;
  inputValue: string;
  img_path = environment.imageUrl+'/assets/img/admin/';

  constructor() { }

  ngOnInit() {
  }

  add() {
    this.control.data.push(this.inputValue);
    this.inputValue = '';
  }

  remove(index) {
    this.control.data.splice(index, 1);
  }

}
