0

I have a root component (called ComponentA) which has a formGroup and inside this formGroup one formArray. This formArray I want to be built in another component. Is there any way to create a component which returns a formArray value?

4
  • Do you mean that from the form you want your component to only return the array (not the formArray)? Commented May 30, 2019 at 7:46
  • Most probably your logic is wrong here because you are thinking the opposite way. The correct approach would be to have a child component with an @Input() formControl: FormControl. There, from the parent component you would pass in the formControl from the formgroup you made Commented May 30, 2019 at 8:00
  • In stackoverflow.com/questions/55641362/… I put how use a formArray as top control. In stackoverflow.com/questions/55895193/… using the idea use a child component. My Idea it's always the same. The form is created in the parent component, you pass as Input hte formArray Commented May 30, 2019 at 8:50
  • @Eliseo, you were right, I used your approach, Thanks Commented May 31, 2019 at 11:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.