title: Can i send a object to a reactive form?
body: <p>I would like to ask if it is possible to send a whole object to the reactive form in angular 2.</p>
  
  <p>This is my form:</p>
  
  <pre><code>this.parameterForm = this.fb.group({
  
    'name': ['', Validators.required],
    'description': "",
    'parameterType':''
  });
  </code></pre>
  
  <p>The third attribute (parameterType) should be a object. (The name and description are only plain strings.</p>
  
  <p>My HTML for the parameterType is(formControlName is used to map it):</p>
  
  <pre><code>&lt;label for="parameterType"&gt;Parameter Type&lt;/label&gt;
  &lt;select id="parameterType" class="form-control" formControlName="parameterType"&gt;
    &lt;option *ngFor="let parameterType of parameterTypes" [value]="parameterType"&gt;
      {{parameterType.name}}
    &lt;/option&gt;
  
  &lt;/select&gt;
  </code></pre>
  
  <p>The values in the select are objects (which are created elsewhere). When submitting the form, I would like to have the parameterType object. The submit is trying to parse the form to a object called Parameter:</p>
  
  <pre><code>export class Parameter {
  
    public id: number;
    public name: string;
    public description: string;
  
    public parameterType? : ParameterType
  } 
  </code></pre>
  
  <p>But when im trying to read the result in the console, the parameterType contains just a string "[Object object]", which looks like the parameterType is just a String and when submitting the form, the object is converted to a simple string.</p>
  
  <p>My submit function is like this:</p>
  
  <pre><code>  onSubmit( {parameter}:{parameter: Parameter} ) {
      console.log(parameter);
    }
  </code></pre>
  
  <p>Now im just doing it so, that into parameterType im sending the id and through a service I get the object but this solution is not very nice. Do you know any way i could pass the object to the form?</p>
  
  <p>Thanks</p>