In the above Demo , I have built a reactive form with the input field inside a child component.I am trying to add new form control inside the child component and validate it inside the component itself.I am getting the following error.
Error: Cannot read property 'errors' of undefined
I am not sure what is the error and very new to the Reactive Forms.In Brief what i am trying to do is,
- Append new control to the parent form group from the child component
- Validation of the newly added control should be done inside the child component itself