I might be missing something here but I can\'t make this JSONP request work, here is the code:
var url = \'http://\' + server + \'?callback=JSON_CALLBACK\';
If the response data is "pure" JSON, we can just handle it with angular's $http.get.
$http.get(url).
then(function(response) {
// this callback will be called asynchronously
// when the response is available
$scope.responseArray = response.data;
}, function(response) {
// called asynchronously if an error occurs
// or server returns response with an error status.
});
Refer to the example on w3schools