If I run this....
var url = "http://api.ean.com/ean-services/rs/hotel/v3/list?cid=xxx&apiKey=xxx&minorRev=30¤cyCode=AUD";
$http.jsonp(url)
.then(function(mycallback){
$scope.md = mycallback;
var mydata = mycallback.data;
console.log(mydata);
});
I get: this error SyntaxError: missing ; before statement
If I change it to get:
var url = "http://api.ean.com/ean-services/rs/hotel/v3/list?cid=xxx&apiKey=xxx&minorRev=30¤cyCode=AUD";
$http.get(url)
.then(function(mycallback){
$scope.md = mycallback;
var mydata = mycallback.data;
console.log(mydata);
});
I get this error SyntaxError:JSON.parse.unexpected end of data at line 1 column 1 of the json data
If I put callback=JSON_CALLBACK at the end it makes no difference. Either which way I can't console.log this endpoint. So stressful.
I have tried other endpoints such as these and these work correctly var url = 'http://jsonplaceholder.typicode.com/posts/1'; var url = "http://www.w3schools.com/angular/customers.php";


console.logcall, or before that? Do you haveJSON_CALLBACKdefined? Can we see the source of that function?