how to select default items in angular material 2 select multiple
I'm working on angular 2 material app, I have a case where there is multiselect element and in that I have a list with checkbox so I can select multiple items at a time. I'm able to to that with angular material component, but what I want is 2-3 items to be checked by default, and if I select/deselect a particular item, then I should get checked/selected flag as true/false. <md-select multiple="true" [(mgModel)]="test"> <md-option *ngFor="let l of list" [value]="l"> {{l.name}} </md-option> </md-select> var list = [{name:'abc'},{name:'cbv'},{name:'hgf'},{name:'rty'},{name:'fdv'},{name:'vbg'}]