how to set selected option as default
<md-select [(ngModel)]="selectedState" placeholder="State">
<md-option *ngFor="let state of states" [value]="state.value">
{{state.title}}
</md-option>
</md-select>
Set the default value to selectedState. e.g:
states: any = [{value:0, title: 'Mac'}, {value:1, title:'Windows'}, {value: 2, title: 'Linux'}];
selectedState: number = 2;
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Set the default value to selectedState. e.g: