I'm learning AngularJS and I've set it up with an mvc application. I'm trying to convert a small piece of code that was written before in JQuery to AngularJS but can't figure out how to get it working. The problem is that I don't know how to call a codebehind method in my controller with AngularJS ?
This is how it is working now in JQuery:
//JQuery calling code behind
$(document).on("click", ".open-AppDescriptionDialog", function () {
var title = "Title";
var state = "active";
//call method
$.post('<%= Url.Action("StatusInfoString") %>', { header: title, status: state }, ParseResult);
});
//method in controller
[HttpPost]
public ActionResult StatusInfoString(string path, string status)
{
ServiceClient serviceClient = new ServiceClient();
var data = serviceClient.GetResults();
return Content(data);
}
Anyone an idea how this is done ?
$httpservice in angularjs