user1937021 user1937021 - 7 months ago 44
AngularJS Question

accessing api for Angular application

I'm trying to access this api for an angular app I am trying to create, you can view it here:

but it's not loading the data, anyone see what is wrong?

angular.module('', []).
factory('footballdataAPIservice', function($http) {

var footballdataAPI = {};

footballdataAPI.getFixtures = function() {
return $http({
method: 'JSONP',
headers: { 'X-Auth-Token': '613a6b6937394ae8a94d69f358f76902' },
url: ''

return footballdataAPI;


I had to fetch the data the following way in services.js:

 footballdataAPI.getFixtures = function() {

        $http.defaults.headers.common['Auth-Token'] = '<INSERT AUTH TOKEN HERE>';
        return $http.get('');


The api provider gave me the auth token for access.