Questions & Answers

Angular Data binding repeated

I created a form. then i added a link to add a section like previous. image1
when clicked add another address, it displayed address 2 form. image2
then i clicked the first input field, the validations errors are displayed in 2nd form also. image3

how to fix this? app.component.html

<label for="line1">STREET 1</label>
   <input id="line1" type="text" formControlName="line1" required/>


formAddress ={
    line1: ["", Validators.required],
    line2: '',
    postalCode: ["", Validators.required],
2023-01-25 07:42:02
Can you create a demo on StackBlitz? Want to know the implementation for adding the new address line.Thanks.
Answers(0) :