I want to select all the options by default in mat-select
Here is my code:
<mat-form-field appearance="outline">
<mat-label>Questions ({{questionSelected}} of {{structureViewObj.records[0].questions.length}})</mat-label>
<mat-select multiple (selectionChange)="selectQue($event.value)" >
<mat-option *ngFor="let item of structureViewObj.records[0].questions"
[value]="item.questionId" [selected] = "true">{{item.label}}</mat-option>
</mat-select>
</mat-form-field>
here I am using [selected] = "true" but it is not working.