Answer the question
In order to leave comments, you need to log in
How to use one component several times but with different values?
I have registration steps on the page. Each step is a separate component. In one of the steps, the user enters their contact details and can add additional information. Contacts for this by clicking on the button will appear one more step. This step will look identical to the previous one and have the same logic. I want to reuse a component with a main contact step. The problem is that when this component is called again, the fields of this step (written in Reactive forms) store the values that were entered in the previous step. And if you do form.reset (), then the fields of the previous step are cleared, and the new one remains filled. It is necessary that it be the other way around and that the user can add an unlimited number of additional. contacts. Each additional contact is a new step.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question