title: Trouble binding nested arrays of checkboxes in Angular 6 reactive form
body: <p>I have a dynamic reactive form with the following structure, which is intended to create a matrix consisting of an arbitrary number of users each with an arbitrary number of userRoles:</p>
  
  <pre><code>this.form = this.formBuilder.group({
    users: this.formBuilder.array(
      this.usersRoles.map(
        urs =&gt; this.formBuilder.group({
          userRoles: new FormArray(
            urs.map(r =&gt; new FormControl(r))
          )
        })
      )
    )
  });
  </code></pre>
  
  <p>In the above code, this.usersRoles is an an array of boolean values (e.g 0: true, 1: false, 2: false, etc) representing the initial state of a checkbox stored as FormControl(r).</p>
  
  <p>When this structure is populated with data, the form is rendered in a table as follows:</p>
  
  <pre><code>  &lt;tr formArrayName="users" *ngFor="let user of form['controls']['users']['controls']; index as u"&gt;
      &lt;td *ngFor="let userRole of user['controls']['userRoles']['controls']; index as i"&gt;
          &lt;input type="checkbox" [formControlName]="i"&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  </code></pre>
  
  <p>My problem is with binding the rendered form to the underlying array of controls. As written above, this html generates the error "control.registerOnChange is not a function", which seems to indicate that the template cannot find the control from the form group.</p>
  
  <p>I feel like I am missing something simple here, but can't quite figure out what it might be. For instance, I tried adding formArrayName="userRoles" to the td that wraps the checkbox, thinking that would be required in order to differentiate the checkboxes in one user row from another, but then received "Cannot find control with path: 'users -> userRoles'".</p>
  
  <p>Interestingly, the first user order renders fine (albeit without any boxes being checked) before triggering errors so I think I'm on to something with that forArrayName thing... Any help is much appreciated!</p>