I have a hidden input field that contains a value I need to send my mvc controller.
$http({ method: 'GET', url: '/User/GetProjectsList' })
.success(function (data, status, headers, config) {
$scope.workflow = [];
$scope.Projects = data;
})
.error(function (data, status, headers, config) {
alert('error');
});
And the hidden field is:
<input type="hidden" ng-model='ProjectId' value="{{ProjectsObj.IDWorkflow}}"></input>
How can I send the value to the my controller and how do I get it in the controller? This is the method I had on the MVC controller.
[HttpPost]
public JsonResult GetProjectsList()
{
return Json();
}