$http({
method:'GET',
url:"js/NewWork.json"
}).then(function success(response){
$scope.datas=response.data;
},function error(response){
});
method:'GET',
url:"js/NewWork.json"
}).then(function success(response){
$scope.datas=response.data;
},function error(response){
});
本文介绍了一个使用AngularJS通过HTTP GET请求从本地文件加载JSON数据的简单示例。该示例展示了如何在成功获取数据后将其绑定到$scope.datas,并在遇到错误时进行处理。
2万+

被折叠的 条评论
为什么被折叠?



