1
IM,我不能让这个花掉的工作:角JS JSONP例如使用角度JS JSONP功能不到风度的作品有麻烦
http://plunker.co/edit/xQVBchTYOro1CB979021
谁能帮助我?
IM,我不能让这个花掉的工作:角JS JSONP例如使用角度JS JSONP功能不到风度的作品有麻烦
http://plunker.co/edit/xQVBchTYOro1CB979021
谁能帮助我?
随着JSONP“黑客”,你必须确保服务器的响应包含回调的调用。为了使您的工作,例如,你应该改变prov.json文件,所以它看起来像如下:
angular.callbacks._0({
"id": "40796308305",
"about": "The Coca-Cola Facebook Page is a collection of your stories showing how people from around the world have helped make Coke into what it is today.",
...
})
上有许多JSONP来源,例:What is JSONP all about?
用得到的,而不是JSONP,你cokacola的细节...
async: function(page) {
var url = 'prov.json';
var promise = $http.get(url).error(function (response, status) {
alert("fai");
}).success(function (response, status) {
alert(response.about);
}).then(function (response, status) {
return response.data;
});
return promise;
}};
是的,我知道,但我需要一个JSONP,一个得到我打算使用它会给我一个跨域例外。 –