1
I have a method Index, where it takes a parameter, makes a query and returns a list.
I need to run that list along with view or get that list some other way, so I can access list via Angularjs.
public ActionResult Index(int id)
{
_check.NumberOfregistrationUser = id;
// variável que guarda o resultado da minha consulta
var list = GetUserByNumberOfregistration(_check.NumberOfregistrationUser);
return View();
}
You have several options there, but when working with Angularjs, you usually query the server data with HTTP calls. If this is the case you will need another action only to return the data to the customer. Otherwise, you can put the data in Viewbag or return them as a model of the view and serializar them there. For all the effects the last two options seem to me very bad and a bad use of a framework frontend as Angularjs. Well, for you to receive an answer, you need to [Dit] the question and clarify what you intend to do.
– Jéf Bueno