I am learning AngularJS and I installed it using the mvc application. I am trying to convert a small piece of code that was written earlier in jQuery into AngularJS, but cannot figure out how to make it work. The problem is that I do not know how to call the codebehind method in my controller using AngularJS?
Here's how it works in jQuery:
$(document).on("click", ".open-AppDescriptionDialog", function () {
var title = "Title";
var state = "active";
$.post('<%= Url.Action("StatusInfoString") %>', { header: title, status: state }, ParseResult);
});
[HttpPost]
public ActionResult StatusInfoString(string path, string status)
{
ServiceClient serviceClient = new ServiceClient();
var data = serviceClient.GetResults();
return Content(data);
}
Does anyone know how to do this?
source
share