I am trying to retrieve data from this API using angular, but I'm not sure what I'm doing wrong. I followed this tutorial and adapted it but not working.
http://www.toptal.com/angular-js/a-step-by-step-guide-to-your-first-angularjs-app
This is the JSON I am using:
http://www.football-data.org/fixtures
I set up a plunker so you can see the code:
http://plnkr.co/edit/H1bm1oaeBv3xE4sBL82U
angular.module('FootballFixturesApp.services', []).
factory('footballdataAPIservice', function($http) {
var footballdataAPI = {};
footballdataAPI.getFixtures = function() {
return $http({
method: 'JSONP',
url: 'http://www.football-data.org/fixtures'
});
}
return footballdataAPI;
});