i am also suffer the same problem and my code is like:
$http({
method: 'JSONP',
url:
'http://localhost:8089/projects/?viewType=thumbnails&count=50&contentType=Projects&page=1'
// params : {callback : 'JSON_CALLBACK'}
}).
success(function(status) {
console.log("Response Success",status);
//your code when success
}).
error(function(status) {
console.log("Response Fails...",status);
});
On Friday, December 11, 2015 at 6:26:50 PM UTC+5:30, Steven Ottz wrote:
>
> I am trying to get an api cross browser using jsonp. This was working
> fine, now all of a sudden I get this error SyntaxError: missing ; before
> statement
>
> It gets the request using firefox in the network dev tools as 200 but it's
> returning it to the console log to show this SyntaxError: missing ; before
> statement
>
> I can't understand it..pls help
>
> var url = "
> http://api.ean.com/ean-services/rs/hotel/v3/list?callback=JSON_CALLBACK";
>
> $http.jsonp(url)
> .success(function(response){
> console.log(response.data);
> });
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.