title: How to populate mat-select with angular material?
body: <p>Hey I'm trying to use angular material and I'm having an issue. In my project I get movies details such as title,year,genre and so on. I'm trying to make an edit popup and when I got to the genre edit I got a little problem. how can I populate the select line with genres the movie already has?</p>
  
  <p>lets say for example I want the default value to be: "Action,Comedy".</p>
  
  <p>my html:</p>
  
  <pre><code>&lt;mat-select placeholder="Genre" [formControl]="genre" multiple&gt;
      &lt;mat-option *ngFor="let genre of genresList" value="Action,Comedy" &gt;{{genre}}&lt;/mat-option&gt;
    &lt;/mat-select&gt;
    &lt;mat-error *ngIf="genre.hasError('required')"&gt;
        Title is &lt;strong&gt;required&lt;/strong&gt;
      &lt;/mat-error&gt;
  &lt;/mat-form-field&gt;
  </code></pre>
  
  <p>component:</p>
  
  <pre><code>export class MyDialogComponent implements OnInit {
  
    selectedMovie: MyMovie;
  
  
    title:FormControl;
    year:FormControl;
    runtime:FormControl;
    genre:FormControl;
    director:FormControl;
  
  
    genresList: string[] = ['Action', 'Comedy', 'Horror', 'Fantasy', 'Drama', 'Romance'];
  
    constructor(private dataService: DataService) {
      this.selectedMovie = dataService.selectedMovie;
  
      this.title = new FormControl(this.selectedMovie.Title, [
        Validators.required
      ]);
      this.year = new FormControl(this.selectedMovie.Year, [
        Validators.required
      ]);
      this.runtime = new FormControl(this.selectedMovie.Runtime, [
        Validators.required
      ]);
      this.genre = new FormControl("this.selectedMovie.Genre", [
        Validators.required
      ]);
      this.director = new FormControl(this.selectedMovie.Director, [
        Validators.required
      ]);
  
  
    }
  </code></pre>
  
  <p>Appreciate any help! thanks</p>
  
  <p>update:</p>
  
  <pre><code>this.dataService.getMovie(this.moviesToLoad[i]).subscribe(res =&gt; {
  
          this.movie = {
             id: this.id,
             Title: res.Title,
             Year: res.Year,
             Runtime: res.Runtime,
             Genre: res.Genre.split(","),
             Director: res.Director
            }
  </code></pre>
  
  <p>res is just string which im trying to change to array, something wrong over since i get only the first element of the array in the default mat-select.. how can i fix that?</p>