关于 angular 跨域问题咯
楠小南 2017-02-12 10:23:14
$http.jsonp("https://xxx.com/?jsonp=JSON_CALLBACK")
.success(function(data){
});
上面的是angular的默认回调函数
但如果指定回调函数的话就要window下的全局函数了。
像这样的
$http.jsonp("https://xxx.com/?jsonp=Callback")
他的回调函数是 window下的全局函数了
function Callback(data) {
}
返回的数据我要 repeat ,但anhular 好像获取不到呢。第一种就可以,指定回调函数的话要怎么整?