I try to load a JSONP File with AngularJS. This is my code:
var urlCal = 'http://www.google.com/calendar/feeds/[email protected]/public/full';
var allParams = {
"alt" : "json-in-script",
"orderby" : "starttime",
"max-results" : "15",
"singleevents" : "true",
"sortorder" : "ascending",
"futureevents" : "true"
}
$http.jsonp(urlCal + "?callback=bla", {params: allParams})
.success(function(data){
console.log(data);
});
but when I run this in the brouwser it sows me this error: "Uncaught ReferenceError: bla is not defined "
I think the problem is that the json file starts with "// API callback" but I am not sure.
Can somebody help me?
callback=JSON_CALLBACK