我嘗試從thetvdb api獲取角度js的橫幅信息,而不工作。這裏是完整的代碼:來自thetvdb的角度js和XML響應
var app = angular.module("tvdbApp", []);
app.controller('bannersCtl', function($scope, $http) {
$http.jsonp(
//'https://thetvdb.com/api/<myapikey>/series/274431/banners.xml' // gotham
'https://thetvdb.com/api/<myapikey>/series/279121/banners.xml' // flash
).then(function(res) {
console.log(res)
}, function(res){
console.error(res)
})
});
當然,API密鑰是有效的。
當我在瀏覽器中嘗試url-s時,效果很好,我得到了XML。
什麼問題?
謝謝。
這是沒有重複,另一個問題是jQuery和我的問題是角js + xml <> jsonp 只有錯誤信息匹配。 (當然) –