0

I used this example to separate each step of the stepper in different components:

https://stackblitz.com/edit/angular-material-stepper-with-component-steps?file=app%2Fstep-one%2Fstep-one.component.html

The problem is, that after filling each input field with some content till step is "done" and then switch back to step "1" and editing some values will delete all the content of step "2" (the address) field. You can see this behavior in the json representation.

If I want to include the step 2 (address) again, I have to click in the field and edit it...after that, the content is again in the form.

I cannot figure it out how to fix this.

Andrew Halil
  • 1,195
  • 15
  • 15
  • 21
maya
  • 1

1 Answers1

0

That's why in form.service where you subscribte stepOne, set the address property to empty string

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 28 '21 at 07:51