title: how to set value to a FormGroup contains FormArray in Angular
body: <p>If I have some data, the data struct like this:</p>
  
  <pre><code>interface IProject {
     name: string;
     tasks: ITask[];
  }
  interface ITask {
     name: string;
     employee: IEmployee[];
  }
  interface IEmployee {
     name: string;
  }
  </code></pre>
  
  <p>And now I have some project data like this:</p>
  
  <pre><code>project = {
      name: 'first project',
      tasks: [
          {
              name: 'task1',
              employee: [{name: 'employee1'}, {name: 'employee2'}],
          },
          {
              name: 'task2',
              employee: [{name: 'employee2'}, {name: 'employee3'}],
          },
      ],
  }
  </code></pre>
  
  <p>Maybe this way is useful:</p>
  
  <pre><code>ngOnInit() {
      this.form = this.fb.group({
          name: [this.project.name],
          tasks: this.fb.array([]),
      });
      this.setTasks();
  }
  
  setTasks() {
      const taskControl = &lt;FormArray&gt;this.form.controls.tasks;
      this.project.tasks.forEach(t =&gt; {
          const taskForm = this.fb.group({
              name: [t.name],
              exployee: this.fb.array([]),
          });
          const employeeControl = &lt;FormArray&gt;taskForm.controls.exployee;
          t.exployee.forEach(e =&gt; {
              employeeControl.push(this.fb.group({name: [e.name]}));
          }
          taskControl.push(employeeControl);
      }
  }
  </code></pre>
  
  <p>Is there any elegant way to build a FormGroup with FormArray and set these data to the form?</p>