XMLHttpRequest无法加载。 No' Access-Control-Allow-Origin'标题存在

时间:2016-02-17 11:13:08

标签: angularjs api

angular.module('footApplication.services', [])
    .factory('AllBet', function ($resource) { 
        return $resource('http://api.football-data.org/v1/soccerseasons/1/fixtures');  
    });

.controller("GetAllBet",function($scope,$http){
    $http.get("https://edg.epa.gov/data.json").success(function(data){
        $scope.teams=data.data;
        console.log($scope.teams.conformsTo);
    });    
});

1 个答案:

答案 0 :(得分:0)

您需要注册以允许CORS:

enter image description here