我試圖從controller.So設置角料滴的默認值向下到目前爲止,我得到這個:設置角材料從控制器下拉默認值
<md-select ng-model="$ctrl.selected.displayType" ng-change="$ctrl.getDisplayType($ctrl.selected.displayType)">
<md-option ng-repeat="display in $ctrl.displayTypes" ng-value="display">{{display.Name }}</md-option>
</md-select>
var self = this;
self.displayTypes = [{ "Name": 'All' }, { "Name": 'Active' }, { "Name": 'Non Active' }];
self.display = { "Name": 'All' };
您應該使用'NG-模型options'和'trackBy'指定默認值。看我的[回覆](http://stackoverflow.com/a/42832848/3543808) –