Angular Material md-select default selected value
<mat-select [value]="0" >
We can easily do it using setting value to default value
Use [(ngModel)]
:
<mat-select [(ngModel)]="selectedOption">
<mat-option value="1">One</mat-option>
<mat-option value="2">Two</mat-option>
</mat-select>
Component:
selectedOption = '1';
DEMO
Edit #1:
Since Material2.0.0#beta10 (specifically this PR) you can select a value using the value
property of MatSelect
:
<mat-select [value]="selectedOption">
<mat-option value="1">One</mat-option>
<mat-option value="2">Two</mat-option>
</mat-select>
Component:
selectedOption = '1';
Note that you can also use it with two-way data binding -> [(value)].
DEMO