I want to get angularjs value from AngularController.js to CCharpController.cs
This I want to sum value from $scope.count1 and $scope.count2
`
$scope.onSubmit = function () { for (var i = 0 ; i < $scope.Data.length ; i++) { if ($scope.Data[i].1 === true) { $scope.count1 += 1; } else if ($scope.Data[i].2 === true) { $scope.count2 += 1; } } }
`
and pass to CCharp function like this,
`
[Route("api/WarehousePlan/AllowWarehousePlan")] [HttpPost] [Authorize] public IHttpActionResult AllowWarehousePlan([FromBody] WarehouseAllowDenyModel model){ .... var count = $scope.count1 + $scope.count2 }
`
I expect receive count value from angularjs function.
HttpPost
request to API URL with the count value as a parameter, then your C# controller will receive it as an argument.