title: How to get the value of list with same formcontrolname?
body: <p>I have 4 inputs which are generated using loop . And I am using angular forms for UI , but the problem is I am getting only last input value and the requirement is I need all the input values provided I cannot generate the formControlName dynamic . Is there any way to bypass only getting the last value and get all values ?? </p>
  
  <p>The HTML code for the same is(this loop will execute based on dataArr,here assume it is executing 4 times)  :</p>
  
  <pre><code>&lt;form [formGroup]="dataForm"&gt;
     &lt;div *ngFor = "let data of dataArr;"&gt;
  
      &lt;input type="text" placeholder="Key" value={{data.key}} formControlName="key"/&gt;
  
     &lt;/div&gt;
  &lt;/form&gt;
  
  &lt;button type="button" style="background-color: #4980FF;" (click)="save();"&gt;Save&lt;/button&gt;
  </code></pre>
  
  <p>The code in .ts file :</p>
  
  <pre><code>  // it is initializing and registering the form value
    dataForm = new FormGroup({
      key: new FormControl('', [Validators.required])
  
    });
  
    save(){
     // Here I am trying to print the form value 
    }
  </code></pre>
  
  <p>I am looking to get all the values when I click save button and not only the last value .</p>