In Angular JS are created inputs.
<input type="text">
<input type="text">
How I can to get values from each inputs and send to server?
I tried:
<input type="text" ng-model="typeInput">
But I get value only one field.
In server I am planning to get data format: $_POST['type'][0] = 'One value'; $_POST['type'][1] = 'Two value';
I mean, that I need send to server array of values. For example:
name="type[]" value="1"
name="type[]" value="2"
name="type[]" value="3"
So, in server I cando loop for check:
foreach($_POST['type'] as $val){
//prepare
}
$scope.typeInputwhile sending it