It's How different
File: services.js ------------------------- // Atnd API GET app.factory('EventAtnd', function($http, EventConnpass) { var getEvent = function(query, callback){ $http.get('http://api.atnd.org/events/', { params : { keyword : query, count : 10, ym : "201411,201412", format : 'json', callback : 'JSON_CALLBACK' } }).success(function(data){ if(data.events){ atnd_events = data.events; callback(atnd_events); } }); } return {get : getEvent}; });