I have a large table of data and a select field in each <td>. When selecting a value in that select field, I want to POST that value and an additional array to the server.
Unfortunately, the additional array is being ignored by Angular:
<td>
<input type="hidden" ng-model="compatibility.attributes" ng-value="[x.id, y.id]">
<select ng-change="addCompatibility(compatibility)"
ng-model="compatibility.rating"
ng-options="rating.name for rating in ratings">
<option value="">Rate</option>
</select>
</td>
Both x.id and y.id are being resolved correctly. But they're not being included in the compatibility object when sending my request. Instead, only compatibility.rating is being filled.
$scope.addCompatibility = function(c) {console.log(c);})where the only valuecholds israting.