After my get request i get
$scope.variables = response.data;
<select name="varSelect" id="varSelect" ng-model="wid.adapter">
<option ng-repeat="variable in variables" value="{{variable.id}}">{{variable.name}}</option>
</select>
<input type="text" ng-model="wid.url" />
<input type="text" ng-model="wid.name" />
$http.post(some_url, $scope.wid).then(function (response) {
console.log(response);
});
use the variable
as the value not the id
and use the ng-option
attribute on the select to bind it properly
<select name="varSelect" id="varSelect" ng-model="wid.adapter"
ng-options="variable.name for variable in variables">
</select>