我有角度的形式,我正在使用md-select和md-option。但是當我點擊下拉菜單時,屏幕凍結,如果我通過檢查元素md-option將會看到。Angularjs md選項顯示在Inspect中,但不顯示在屏幕上
<md-select ng-model="Severities" placeholder="Select a Severity">
<md-select-label>{{ Severities.name }}</md-select-label>
<md-option ng-value="opt.id" ng-repeat="opt in severities.availableOptions">
{{ opt.name }}
</md-option>
</md-select>
$scope.severities= {
availableOptions: [
{
id: '1',
name: 'name1'
},
{
id: '2',
name: 'name2'
},
{
id: '3',
name: 'name3'
}
], };
你能給一些控制器代碼嗎? –
$ scope.severities = { availableOptions:[ {id:'1',name:'name1'}, {id:'2',name:'name2'}, {id:'3',name :'name3'} ], }; – user2902067
當我按F12(檢查元素)時,md選項將具有所有值。但屏幕沒有顯示,並凍結屏幕 – user2902067