I want to send C# List from Back-end (Asp.net Core) to Front-end (Aurelia). The app.js in Aurelia uses Babel. How to write the app.js to get the List? Is there another way other than http? Like call the c# file directly?
This is my HomeController.cs:
[Route("api/[controller]")]
[ApiController]
public class HomeController : Controller {
[HttpGet("Data")]
public Dictionary<string, object> Data() {
var properties = new Dictionary<string, object>()
{
{“type”, “list”},
{“title”, “title”},
};
return properties;
}
}