title: how to access the index value of formarray of angular, when nested formControls are placed in a separate component?
body: <p>I followed a tutorial from the website link <a href="https://scotch.io/tutorials/how-to-build-nested-model-driven-forms-in-angular-2" rel="nofollow noreferrer">https://scotch.io/tutorials/how-to-build-nested-model-driven-forms-in-angular-2</a> , to make a reactive form with an ability to add multiple form controls and that worked well. I moved the nested form controls in a separate component as guided in the tutorial and i need to access the index value of the formarray from the parent component. I want this index value to set that in one of the formconrols default value here is my code in plnkr,
  <a href="http://plnkr.co/edit/ZjEuBWrmJDiRmP4FeCzv?p=preview" rel="nofollow noreferrer">http://plnkr.co/edit/ZjEuBWrmJDiRmP4FeCzv?p=preview</a></p>
  
  <p>my separated day and description component,</p>
  
  <pre><code>import { Component, Input } from '@angular/core';
      import { FormArray, Validators, FormGroup } from '@angular/forms';    
  
      @Component({
          selector: 'day-and-daydescription',
          template: ` &lt;div [formGroup]="formGroup"&gt;
                          &lt;div class="form-group col-xs-4" &gt;
                              &lt;label for="text"&gt;Day&lt;/label&gt;
                              &lt;input  type="text" class="form-control" formControlName="day" [ngModel]="group.i + 1"  readonly&gt;                    
                          &lt;/div&gt;
                          &lt;!--Day Description--&gt;
                          &lt;div class="form-group col-xs-4"&gt;
                              &lt;label&gt;Description&lt;/label&gt;
                              &lt;input  type="text" class="form-control" formControlName="description"&gt;
                          &lt;/div&gt;  
                      &lt;div&gt;`
      })
      export class DayAndDescriptionComponent {
          @Input('group')
          public formGroup: FormGroup;
      }  
  </code></pre>
  
  <p>Please have a look at the whole code in plunker.</p>