问题
var app = angular.module('twitchTV',[]).config(function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist(['**']);
});
app.controller('myCtrl',["$scope","$http", function($scope, $http,){
var api = 'https://wind-bow.gomix.me/twitch-api/ESL_SC2';
$http.jsonp(api,{jsonpCallbackParam: 'callback'}, {
headers: {
'Access-Control-Allow-Origin' : '*',
'Content-Type': 'application/json'
}
}).then(function(data) {
console.log(data.data);
});
}]);
I am not able to get the desired response from the twitch tv api.
来源:https://stackoverflow.com/questions/47979394/not-getting-json-response-from-twitch-tv-api