title: Display and update FormGroup inside FormArray
body: <p>I am displaying a FormArray with an *ngFor. What i am trying to do is when i click on an item in the ngFor, to populate the  with that items 'task' property.</p>
  
  <p>Additionally, when i type/update the contents of input, the original form is updated/patched.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form [formGroup]="myForm"&gt;
  
      &lt;div [id]="i" 
          class="example-box"
          *ngFor="let item of myForm.get('items').controls; let i=index;"
          (click)="updateInput(item)"&gt;
          {{item.value.task}} to be
      &lt;/div&gt;
  
    &lt;br&gt;
    &lt;br&gt;
  
    &lt;input formControlName="xxx" /&gt;
  
    &lt;br&gt;
    &lt;br&gt;
  
      {{ myForm.value | json}}
  &lt;/form&gt;
  </code></pre>
  
  <p>Component.ts:</p>
  
  <pre><code>export class CdkDragDropSortingExample { 
    nominatedArray = [];
    myForm: FormGroup;
  
    constructor(private fb: FormBuilder) {
      this.myForm = this.fb.group({
        title: ['title'],
        items: fb.array([
          fb.group({
            completed: fb.control(false),
            task: fb.control('Set Alarm'),
            position: fb.control(0)
          }),
          fb.group({
            completed: fb.control(false),
            task: fb.control('Brush teeth'),
            position: fb.control(1)
          }),
          fb.group({
            completed: fb.control(false),
            task: fb.control('Shower'),
            position: fb.control(2)
          }),
          fb.group({
            completed: fb.control(false),
            task: fb.control('Get ready'),
            position: fb.control(3)
          }),
          fb.group({
            completed: fb.control(false),
            task: fb.control('Have breakfast'),
            position: fb.control(4)
          })
        ])
      })
    }
  
    updateInput(item) {
      console.log(item);
    }    
  }
  </code></pre>
  
  <p>Stackblitz: <a href="https://stackblitz.com/edit/angular-asevei-t5pm9u" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-asevei-t5pm9u</a></p>