Is it possible to insert multiple row values in an AngularJS controller using a web api?
<tr ng-repeat="rt in xxtt">
<td>
<input type="text" class="form-control" ng-model="rt.name" required />
</td>
<td>
<input type="text" class="form-control" ng-model="rt.email" required />
</td>
</tr>
<button class="btn" ng-click="btnSave()">
Save
</button>
$scope.newarray=[];
params = {
"id": $scope.id
"nameList": [
{
"name": $scope.name
}
]
}
angular.forEach($scope.nameList, function (response) {
$scope.newarray.push({ name: response.name });
});
params = JSON.stringify(params);
alert(params);
LoadSvc.LoadData(params).then(function (response) {
}
Is there a way to add multiple rows of values simultaneously? What is the best method for sending a list of array values from AngularJS to a web api?