*Hi*
*i here try to edit data though angularjs and i got all data in view - but
the only problem is that the dropdownlist don't select the value that
passed to it and i 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>
<https://gm1.ggpht.com/jZfNRz-6t7oV3CJpE1uwHUGd27Rvmi_m8DJVZRtx5lSQ-DjXnXYLOLGgnqj-SzWrIy7EtnNPekcBFrFjNCEfvLbOk43wBCrK-oXzguw31KoNIBhiDubpMc_twBmYGU2yvJaZ3C9_gtXV72qXSPnQFQNEq5YQQQ9CVUd93E45yTaA03p15bTFbzBNSoxT0ZXCH7Cc8ug1RFdw5MouMDeFFUmj7VKPwVILVeaFPv0uGn2Qz_M7RHILNEtny41tzBFjfjXKEENRQyaBJ5d-amk2M5d6DlCeSA8BNxk3cJU3lEbGN0RhVP8jLtJfsWBb1U-6XE-qlLSCEd75WsTVPZK4SNsE1vy9Ik8TMO8siAOAuhSGyS6yPXX4oaMEZeQw6MJFPMm8abFER8YC_C71qKzedUbjYKfzFL5N_ZwQ7RcxDtB-g7u3sY8Ea958knvhF1DxHuaxf4xib8RIyY_rqXiYOT1j1bp_whVsSWj6YWd56ytFYYseg8XDJhUHUgJ2AN9NQ3wwR-gn1emdAbfBhfTQ1tSDc9eyxfiUqQm2HuLmjhSTi27gWrwTdOGaRLwsXhTbuDUrWUinYuQFrY5EwT8jcSeVhcUCTn3ZnjqxZg=w944-h450-l75-ft>
*as you can see i get the value of "CityID" but the dropdownlist don't
select it from items on it, and when i look into html of dropdownlist i
found that:*
<select class="form-control ng-pristine ng-untouched ng-valid" id="CityID"
name="CityID" ng-model="Cust.CityID" style="width=100%">
<option value="? number:2 ?"></option> // this the value in
Cust.CityID ??!!!!!!!!!
<option value="" disabled="disabled">إختر المدينة</option><option
value="1">06-أكتوبر</option><option value="2">أبو زعبل</option><option
value="3">أوتوستراد</option><option value="4">البدرشين</option></select>
*so please what is the problem here and how can i make it works ?*
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.