如何将数据(表数据库)从C#ASP.NET发送到angularjs2? [英] How can I send data (table database) from C# ASP.NET to angularjs2?
本文介绍了如何将数据(表数据库)从C#ASP.NET发送到angularjs2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望将数据从C#代码发送到angularjs2并通过angularjs2绑定此数据。
我尝试过:
我希望将数据从C#代码发送到angularjs2并通过angularjs2绑定此数据。
I want send data from C# code to angularjs2 and bind this data by angularjs2.
What I have tried:
I want send data from C# code to angularjs2 and bind this data by angularjs2.
推荐答案
Angular在AJAX上运行请求,因此在服务器端的控制器中,您创建一个Angular可以通过AJAX调用的方法,并将响应作为JSON格式的数据发回。
Angular works over AJAX requests, so in your controller on the server-side, you create a method that Angular can call over AJAX and send the respond back as JSON formatted data.
这篇关于如何将数据(表数据库)从C#ASP.NET发送到angularjs2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文