AngularJs不能用对象填充选择列表

时间:2015-05-13 06:11:24

标签: angularjs

我有包含选择列表的模态。

这是cmbItemType.DisplayMember = "Text"; cmbItemType.ValueMember = "Value"; var items = new[] { new { Text = "Text1", Value = "1"}, new { Text = "Text2", Value = "2"} }; cmbItemType.DataSource = items; cmbItemType.SelectedIndex = -1; 中的对象:

console.log

和我们的Html:

 Object
config: Object
data: Array[1]
0: Object
__rowIndex: 0
dateTimeFormat: 0
deptCode: 325  

和控制器:

 <select
 ng-options="item.DeptCode as item.dateTimeFormat for item in WFFormOperatorViewMap.data"
 ng-model="singData.ReceiverCode">

<option value="value" selected style="display:none">انتخاب</option>

 </select>  

任何想法?

0 个答案:

没有答案