Newer
Older
import { Component, EventEmitter, Input, OnChanges, OnInit, Optional, Output } from '@angular/core';
import { ScriptParameterType } from '../../../scripts/script-parameter-type.model';
import { ScriptParameter } from '../../../scripts/script-parameter.model';
import { ControlContainer, NgForm } from '@angular/forms';
import { controlContainerFactory } from '../../process-form.component';
/**
* Component that renders the correct parameter value input based the script parameter's type
*/
@Component({
selector: 'ds-parameter-value-input',
templateUrl: './parameter-value-input.component.html',
styleUrls: ['./parameter-value-input.component.scss'],
viewProviders: [ { provide: ControlContainer,
useFactory: controlContainerFactory,
deps: [[new Optional(), NgForm]] } ]
})
export class ParameterValueInputComponent {
/**
* Emits the value of the input when its updated
*/
@Output() updateValue: EventEmitter<any> = new EventEmitter();