I am new to AngularJS
And i have trouble to set dynamic key value.
Here is my code,
VIEW
<td>
<input type="number" class="form-control" ng-model="title[id]" />
</td>
Controller
$scope.update = function() {
$http({
url: 'update.php',
method: "POST",
data: $scope.title
}).success(function (data) {});
}
PHP
[amount] => Array
(
[0] =>
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
[6] =>
[7] =>
[8] =>
[9] => 10
[10] =>
[11] =>
[12] => 12
)
So, my question is if i use id as input array key then always array start with 0 index not specific index.
Thank you !