答案 0 :(得分:0)
在我几周前写的代码(http://codepen.io/nadeemramsing/pen/EgdqLg)中,我使用ng-init和ng-selected在页面加载时设置默认值。
<md-select ng-model="vm.selectedCountry" ng-init="vm.selectedCountry = vm.selectedCountry?vm.selectedCountry : 'CH';">
<md-option ng-value="'CH'" ng-selected="vm.selectedCountry == 'CH'?true:false">Switzerland</md-option>
<md-option ng-repeat="country in vm.countries" ng-value="country.code">
{{country.name}}
</md-option>
</md-select>