Hi this is the coding I have so far… I have a RESTful WCF service and want to populate a select option with a list of data. am I doing it right?
<label class="item item-input item-select">
<div class="input-label">
Lightsaber
</div>
<select ng-model="documents">
<option ng-repeat="item in documents" value="{{item.id}}">{{item.id}}</option>
</select>
</label>
.controller('DashCtrl', function($scope, $http) {
$http.get("http://localhost:15021/Service1.svc/getAllTrucks")
.success(function(data) {
var obj = data;
var ar = [];
angular.forEach(obj, function(index, element) {
angular.forEach(index, function(indexN, elementN) {
ar = {id: indexN.QuoteID, quotenum: indexN.QuoteNumber};
console.log(ar);
});
$scope.documents = ar;
});
console.log(data);
})
.error(function(data) {
console.log("failure");
});