Not similar to https://stackoverflow.com/questions/52235952/cannot-read-property-of-undefined-reactive-forms
StackBlitz - https://stackblitz.com/edit/github-rbjwcd-wtrevw
Having issues with the above demo. I am trying to get the form builder to work with models as per the example. The issue is with the .group
property.
contactForm: FormGroup;
createFormGroupWithBuilderAndModel(formBuilder: FormBuilder) {
return this.formBuilder.group({
personalData: formBuilder.group(new PersonalData()),
requestType: '',
text: ''
});
}
I think the issue might be not initialising the form on the return like:
this.contactForm = this.formBuilder.group
Can anybody get this to run?