cant access JSON response in callback AngularJS
In my net tab I am seeing the responses coming back but I can't get access
to the data for some reason.
Here is the direct link:
https://github.com/users/gigablox/contributions_calendar_data
Tried a couple different ways...
$http
var url =
"https://github.com/users/gigablox/contributions_calendar_data?callback=JSON_CALLBACK";
var data = [];
$http.jsonp(url).success(function(data){
console.log(data);
});
$resource
var handle =
$resource('https://github.com/users/gigablox/contributions_calendar_data',{},{
get:{
method:'JSONP',
isArray: false, //tried true and false
params:{callback:'JSON_CALLBACK'}
}
});
handle.get().$promise.then(
function(contributions){
console.log(contributions);
});
No comments:
Post a Comment