How can I pass mutipul parameters from angularjs -to WebAPi My Api as its Required two parameters
public IHttpActionResult GetData(int pagesize,int Totalpages){---}
angularctrls.js
function GetData() {
var PageDetails={
'currentpage': $scope.currentPage,
'pagesize':$scope.pagesize
}
HomeFactory.GetDat(PageDetails).then(function () {
})
}
Factory.js
EmployeeServiceFactory.GetDat = function (PageDetails) {
return $http({
url:WebAPi+'Home/GetData/',
method: 'GET',
data: PageDetails,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
})
}
Getting Error as
Failed to load http://localhost:3084/Home/GetData/%7B%22currentpage%22:1,%22pagesize%22:5%7D: No 'Access-Control-Allow-Origin' header is present on the requested resource
url:WebAPi+'Home/GetData/'+PageDetailstourl:WebAPi+'Home/GetData/'and methode ? should be method @MdGhousemohi and is your response status 404 ?