title: Angular5 - Preselect the default value in mat-select
body: <p>Good evening,
  I'm working on a project in <strong>Angular5</strong>. In particular I have a material select (<strong>mat-select</strong>) that should select me a role of a user, the <strong>mat-select</strong> is composed like this:</p>
  
  <pre><code>&lt;mat-form-field&gt;
      &lt;mat-select placeholder="Scegli un opzione" [formControl]="form.controls['Ruolo']"  [(ngModel)]="admin.Ruolo"&gt;
           &lt;mat-option *ngFor="let key of keys" [value]="key"&gt;{{roles[key]}}&lt;/mat-option&gt;
       &lt;/mat-select&gt;
  &lt;/mat-form-field&gt;
  </code></pre>
  
  <p>In my reference typescript file, I have a formgroup that handles everything.
  In fact, when I return the user data from the server I assign to the form control in this way:</p>
  
  <pre><code>this.form.controls.Id.setValue(result.Id);
  this.form.controls.Nome.setValue(result.Nome);
  this.form.controls.Cognome.setValue(result.Cognome);
  this.form.controls.Ruolo.setValue(result.Ruolo);
  this.admin = result;
  </code></pre>
  
  <p>The other values are all set correctly, but the problem happens to me for the <strong>Ruolo</strong> field, which is an enumerated (number).</p>
  
  <p>This is original setting form group in constructor:</p>
  
  <pre><code>  this.form = this.fb.group({
          Id: [null],
          Nome: [null, Validators.compose([Validators.required, Validators.minLength(3)])],
          Cognome: [null, Validators.compose([Validators.required, Validators.minLength(3), Validators.maxLength(15)])],
          Ruolo: [null, Validators.required],
      });
  </code></pre>
  
  <p>For complete the informations, this is my class and enum: </p>
  
  <pre><code>export class Admin {
       Id: number;
       Nome: string;
       Cognome: string;
       Ruolo: ERolesAdmin;
  }
  export enum ERolesAdmin {
      SuperAdmin = 1,
      Admin = 2
  }
  </code></pre>
  
  <p>How can I make the mat-select understand that it should preselect that value?</p>
  
  <p>Thx all.</p>