title: Angular Material Multiple Select Options with Object
body: <p><strong>Current Setup :</strong></p>
  
  <ul>
  <li>Angular 4</li>
  <li>Angular Material</li>
  <li>Firebase (Firestore)</li>
  </ul>
  
  <p><strong>Expected Behavior :</strong></p>
  
  <ul>
  <li>Initially selecting multiple objects from my array inside my angular material multiple select.</li>
  </ul>
  
  <p><strong>Current Behavior :</strong></p>
  
  <ul>
  <li>No item is initially selected.</li>
  <li>They get properly selected when clicking them.</li>
  <li>Saving them in Firebase(Firestore) work (Saving the document reference)</li>
  </ul>
  
  <p><strong>Additional Note(s) :</strong></p>
  
  <ul>
  <li>If I use only an object property they do get initially selected properly.</li>
  <li><em>classe.multiclassement</em> is an array of reference</li>
  <li><em>classes</em> is my array of objects</li>
  </ul>
  
  <p><strong>Code Sample :</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;mat-select placeholder="Multiclassement" [(ngModel)]="classe.multiclassement" multiple&gt;
    &lt;mat-option *ngFor="let c of classes | async" [value]="c"&gt;{{c.nom}}&lt;/mat-option&gt;
  &lt;/mat-select&gt;</code></pre>
  </div>
  </div>
  </p>