.factory('Api', function($http) {
var API = "http://127.0.0.1:4567/";
return {
get: function(method) {
return $http.get(API + method).success(function(result) {
return result;
});
}
}
}
然后
console.log(Api.get("MAppData"));
退货
Object {then: function, success: function, error: function}
为什么它不返回结果(响应数据)?