you can only set quantity by binding ng-model
but you are looking to set an full object {product_id: x, quantity: y}
...
so use ng-change instead of ng-model to set formData...
HTML
<input type="number" ng-model="quantity" placeholder="product_{{product.id}}"
ng-change="changeQuantity($index, product.id, quantity)">
CONTROLLER
$scope.changeQuantity =function (index, productId, quantity) {
$scope.formData[index] = {product_id: productId, quantity: quantity};
};
here is working PLUNKER