2017-02-22 18:13:21 +00:00
|
|
|
// #docregion
|
|
|
|
|
import { Component, Input } from '@angular/core';
|
|
|
|
|
import { FormGroup } from '@angular/forms';
|
|
|
|
|
|
|
|
|
|
import { QuestionBase } from './question-base';
|
|
|
|
|
|
|
|
|
|
@Component({
|
2017-08-22 21:31:15 +02:00
|
|
|
selector: 'app-question',
|
2017-02-22 18:13:21 +00:00
|
|
|
templateUrl: './dynamic-form-question.component.html'
|
|
|
|
|
})
|
|
|
|
|
export class DynamicFormQuestionComponent {
|
2019-11-14 13:14:37 +05:30
|
|
|
@Input() question: QuestionBase<string>;
|
2017-02-22 18:13:21 +00:00
|
|
|
@Input() form: FormGroup;
|
|
|
|
|
get isValid() { return this.form.controls[this.question.key].valid; }
|
|
|
|
|
}
|