title: Angular 2 - How to automatically bind object values to related to Form Controls?
body: <p>I'm using <code>model driven forms</code> and I'm searching a better way to bind the data to related to <code>formControlName</code>'s because I have more than 25 fields on my form and I don't want to have to write that code for all <em>fields</em> as I have written for below.</p>
  
  <p><strong>Template:</strong></p>
  
  <pre><code>&lt;input type="text"
         class="form-control"
         formControlName="firstName"
         name="firstName"
         placeholder="First Name"
         required&gt;
  </code></pre>
  
  <p><strong>Component</strong>:</p>
  
  <pre><code>this.refferalService.getReferringDataEdit(id).subscribe(
    result =&gt; {
      this.referringData = result.responseObject;
      this.refferalForm.patchValue({ 
        firstName: this.referringData.firstName 
      })
    }
  )
  </code></pre>
  
  <p>Is there a way to do it "automatically"?</p>