0
在尝试了this问题后,我再次询问如何使用AngularJS在Ionic框架中从Web检索数据。 基本上,我做了回答说:从网络离子阅读json文件
.factory('Advices', function($http) {
var advices = null;
$http.get('http://myurl.myext/myfile.json').success(function (data) {
advices = data;
}).error(function(error) {
console.log('error'); //even if there i print the error it prints nothing
});
//etcetera
我该如何拯救从我的服务器文件?