title: How get fields from children components for parent form?
body: <p>I have following structure:</p>
  
  <p><em>Parent component (<strong>dialog</strong>)</em></p>
  
  <pre><code>&lt;form #dialogForm="ngForm"&gt;
      &lt;app-window-element&gt;&lt;/app-window-element&gt;
  &lt;/form&gt;
  &lt;button (click)="button.callback(dialogForm)"&gt;Click me&lt;/button&gt;
  </code></pre>
  
  <p><em>Child component (<strong>element</strong>)</em></p>
  
  <pre><code>&lt;div&gt;
      &lt;label for="email"&gt;Email&lt;/label&gt;
      &lt;input type="text" name="email" id="email" formControlName="email"&gt;
  
      &lt;label for="password"&gt;Password&lt;/label&gt;
      &lt;input type="password" name="password" id="password" formControlName="password"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And when click to button - send <strong>#dialogForm</strong>.</p>
  
  <p>But I have problem - object <strong>dialogForm</strong> don't has fields from children-components. (<em>dialogForm is NgForm</em>)</p>
  
  <p>And I get error:</p>
  
  <blockquote>
    <p>WindowFormComponent.html:5 ERROR Error: formControlName must be used
    with a parent formGroup directive.  You'll want to add a formGroup
           directive and pass it an existing FormGroup instance (you can create one in your class).</p>
    
    <p>Example:</p>
  
  <pre><code>&lt;div [formGroup]="myGroup"&gt;
    &lt;input formControlName="firstName"&gt;
  &lt;/div&gt;
  
  In your class:
  
  this.myGroup = new FormGroup({
     firstName: new FormControl()
  });
  </code></pre>
  </blockquote>
  
  <p>If I have just fields within form - it is works, but is is don't work with children-components.</p>
  
  <pre><code>&lt;form #dialogForm="ngForm"&gt;
      &lt;label for="email"&gt;Email&lt;/label&gt;
      &lt;input type="text" name="email" id="email" formControlName="email"&gt;
  
      &lt;label for="password"&gt;Password&lt;/label&gt;
      &lt;input type="password" name="password" id="password" formControlName="password"&gt;
  &lt;/form&gt;
  &lt;button (click)="button.callback(dialogForm)"&gt;Click me&lt;/button&gt;
  </code></pre>