C# MVC dropdownlist不选择ng模型中具有值传递的项目-希望得到回复?
我试图通过angularjs编辑数据,我已经查看了所有数据,但唯一的问题是dropdownlist没有选择传递给它的值,我不知道为什么 JS代码:C# MVC dropdownlist不选择ng模型中具有值传递的项目-希望得到回复?,c#,asp.net,asp.net-mvc,angularjs,C#,Asp.net,Asp.net Mvc,Angularjs,我试图通过angularjs编辑数据,我已经查看了所有数据,但唯一的问题是dropdownlist没有选择传递给它的值,我不知道为什么 JS代码: function getCustomer() { var promiseGetStudent = SPACRUDService.getCustomer(ShareData.value); promiseGetStudent.then(function (pl) { pl.data.MirageDate = $filt
function getCustomer() {
var promiseGetStudent = SPACRUDService.getCustomer(ShareData.value);
promiseGetStudent.then(function (pl) {
pl.data.MirageDate = $filter('date')(pl.data.MirageDate, 'yyyy-MM-dd');
$scope.Cust = pl.data;
},
function (errorPl) {
$scope.error = 'failure loading Student', errorPl;
});
}
HTML代码:
<table class="table">
<td style="width:200px; text-align:center; vertical-align:central">إسم العميل</td>
<td>
<table class="table" style="margin-bottom: -3px;">
<tr>
<td style="padding:0; vertical-align:central; width:50%;">
<div class="input-group">
<span class="input-group-addon ion ion-person"></span>
<input type="text" class="form-control" placeholder="إسم العميل" ng-model="Cust.CustomerName">
</div>
</td>
<td style="width:125px; vertical-align:central" class="text-center">المدينة</td>
<td style="padding:0; vertical-align:central">
<input type="text" ng-model="Cust.CityID" name="cid" id="cid" />
@Html.DropDownList("CityID", null, "إختر المدينة", htmlAttributes: new { @class = "form-control", @style = "width=100%", @ng_model = "Cust.CityID" })
</td>
</tr>
</table>
</td>
</tr>
</table>
我得到CityID的值,但dropdownlist没有从项目中选择它,当我查看dropdownlist的html时,我发现:
<option value="? number:2 ?"></option>
那么,请问这里有什么问题,我怎样才能让它工作呢