Update question-control.service.ts

closes #1095
control value now will be initialized with 'question.value', regardless if the control has validation of 'required' or not.
This commit is contained in:
rexebin 2016-04-15 20:34:18 +01:00 committed by Ward Bell
parent 64babe2a69
commit 89f9ea146c
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ export class QuestionControlService {
let group = {};
questions.forEach(question => {
group[question.key] = question.required ? [question.value || '', Validators.required] : [];
group[question.key] = question.required ? [question.value || '', Validators.required] : [question.value || ''];
});
return this.fb.group(group);
}