我使用 AngularJS、Bootstrap、HTML、CSS 制作了 Web 应用程序 GUI。 后端团队正在用 C 编程开发 API。
那么我的 $http 请求(从工厂发送)中的路由将如何与 C 编程 API( Controller )通信以获取数据或执行相关操作。
谢谢!
最佳答案
您只需要 URI,异步请求将如下所示:
$http.get('URI goes here').then(
function (response) {
//success
vm.data = response;
},
function (response) {
//fail
console.log("error");
}
);
关于c - 如何通信 AngularJS 的 $http 路由和用 C 编程开发的 API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37850329/