c# - MVC dropdownlist don't select item with value pass from ng-model - hope get reply? -


i here try edit data though angularjs , got data in view - problem dropdownlist don't select value passed , don't know why ?

js code:

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 code:

<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> 

i value of "cityid" dropdownlist don't select items on it, , when html of dropdownlist found that:

<option value="? number:2 ?"></option> 

so please problem here , how can make works ?


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -