I have this service
this.getyear = function (bookId) {
alert();
var response = $http({
method: "post",
url: "Dashboard/GetyearId",
data: JSON.stringify(12,14),
dataType: "json"
});
return response;
}
this is my controller
controller('myController', function ($scope, AttendanceService) {
var getyear = AttendanceService.getyear();
getyear.then(function (_book) {
})
});
and this is my actionresult method
public ActionResult GetyearId(string Yearid)
{
return Json(Yearid, JsonRequestBehavior.AllowGet);
}
I want to pass 2-3 ids to actionresult and retrive it over there.How can it be possible? I am very new to angularJS .Thanks in advance