0

I'm working on app where we need to create a generic component, in which from the parent component I need to pass dynamic form component in the dialog box component and want to render that dynamic component in dialog box component.

And I want to get the output data of form in the afterClosed method of the dialog box in the parent component.

After referring to the following link I'm able to pass the dynamic form to the dialog box. Here is a link to a small poc of the same: demo link

But not able to pass the output data of the form to the parent component from the dialog box component.

Can someone help me figure out in order to resolve this?

1 Answers1

0

If all you have left is to pass the data back to the parent, then in your onNoClick() method of your child dialog component, you can pass the form data back to the parent in the dialogRef.close(myFormData).

Jnr
  • 1,504
  • 2
  • 21
  • 36
  • We are not able to pass the form data as we don't have the reference of the form in the dialog box component. Can you please provide the stackblitz link of your code if you got succeeded? – Viral Gajera Nov 25 '22 at 12:13