title: set default value of Select option in angular update form
body: <p>I'm working on an update task, I have a list of objects displayed in datatable and I want to execute the update process with a modal contain a form with an input and select options, when click the button to display the form, the input take the first attribute of my objectn but the problem is that the select option does not take a default value which is should be the second attribute of object ! </p>
  
  <pre><code>&lt;a data-toggle="modal" [attr.data-target]="'#modal-centered' + index"&gt;&lt;i class="la la-pencil edit"
                        (click)="patchValue(rowData)"&gt;&lt;/i&gt;&lt;/a&gt;
                    &lt;div [attr.id]="'modal-centered' + index" class="modal fade"&gt;
                      &lt;div class="modal-dialog modal-dialog-centered"&gt;
                        &lt;div class="modal-content"&gt;
                          &lt;div class="modal-header"&gt;
                            &lt;h4 class="modal-title"&gt;{{rowData.name}}&lt;/h4&gt;
                            &lt;button type="button" class="close" data-dismiss="modal"&gt;
                              &lt;span aria-hidden="true"&gt;×&lt;/span&gt;
                              &lt;span class="sr-only"&gt;Fermer&lt;/span&gt;
                            &lt;/button&gt;
                          &lt;/div&gt;
                          &lt;div class="modal-body"&gt;
                            &lt;form [formGroup]="updateForm"&gt;
                              &lt;div class="form-group"&gt;
                                &lt;input type="text" formControlName="name" placeholder="Nom de la commission"
                                  class="form-control"&gt;
                              &lt;/div&gt;
                              &lt;div class="form-group"&gt;
                                &lt;select name="president" class="col-lg-6 custom-select form-control rounded"
                                  formControlName="president"&gt;
                                  &lt;option [ngValue]="null" disabled&gt;Choisir un Président&lt;/option&gt;
                                  &lt;option [value]="president._id" *ngFor="let president of presidents"&gt;
                                    {{president.firstName}}
                                    {{president.lastName}}&lt;/option&gt;
                                &lt;/select&gt;
                              &lt;/div&gt;
                            &lt;/form&gt;
                          &lt;/div&gt;
                          &lt;div class="modal-footer"&gt;
                            &lt;button type="button" class="btn btn-primary" data-dismiss="modal"
                              (click)="updateCommission(rowData._id)"&gt;Sauvegarder&lt;/button&gt;
                          &lt;/div&gt;
                        &lt;/div&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  
  import { HttpClient } from '@angular/common/http';
  import { FormGroup, FormControl } from '@angular/forms';
  
  @Component({
    selector: 'app-commission',
    templateUrl: './commission.component.html',
    styleUrls: ['./commission.component.css']
  })
  export class CommissionComponent implements OnInit {
    commissions: any[];
    updateForm: FormGroup;
  
    presidents: any[];
  
    cols: any[];
    loading: boolean = true;
  
    constructor(
      private http: HttpClient
    ) {
      this.updateForm = new FormGroup({
        name: new FormControl(''),
        president: new FormControl('')
      });
    }
  
    ngOnInit() {
  
      this.http.get('/api/commissions').subscribe((commissions: any[]) =&gt; {
        this.loading = false
        this.commissions = commissions;
      })
  
      this.http.get('/api/users/byType/conseillerMunicipal').subscribe((presidents: any[]) =&gt; {
        this.presidents = presidents;
      })
  
      this.cols = [
        { field: 'name', header: 'Nom' },
        { field: 'presidentFullName', header: 'President' },
      ];
    }
  
  
  
    updateCommission(commissionID) {
      this.loading = true;
      this.http.put('/api/commissions/' + commissionID, this.updateForm.value).subscribe(updatedCommission =&gt; {
        this.loading = false;
        this.commissions.filter(commission =&gt; commission._id === commissionID)[0] = updatedCommission;
      })
    }
  
  
    patchValue(commission) {
      debugger
      this.updateForm.setValue({
        name: commission.name,
        president: commission.presidentFullName
      })
    }
  
  
  }
  </code></pre>
  
  <p>This does the job and displays the presidents in a drop down. However, I also need to select the president of the object to updated by default .</p>