0
//Html content
<select class="form-control" id="pcategory" ng-model="pcategory" ng-options="c.CID as c.Name for c in pcategoryA">
<option value="">-- Select Category --</option>
</select>
<input type="text" class="form-control" id="name" ng-model="name" />
<input type="text" class="form-control" id="price" ng-model="price" />
<input type="text" class="form-control" id="quantity" ng-model="quantity" />
Bu içeriği
// angularJS
$http.get('/api/product/' + $routeParams.id).success(function (data)
{
$scope.pcategory = data.pcategory.CID , // is an object { "CID":1, "Name": "Solid""}
$scope.name = data.name,
$scope.price = data.price,
$scope.quantity = data.quantity
});
Tüm alan pl aşağı biri yardım edebilir damla hariç ayarlanır angularjs bir uygulaması kolaylaştırmak!
Her neyse bu hileler ile çözebiliyordum $ scope.pcategory = "" + data.CID + "", –