0

I have the following code:

var url = 'http://someURL?arg1=test&arg2=test&callback=JSON_CALLBACK';

$http.jsonp(url)
.success(function(data){
    console.log(data.found);
});

I get a status code of 200 ok and I can see the response data on the network tab of chrome with no issues.

This is the response:

[{"card_token":"D233B338C5154BA989FBBF88ECBFFE4C","cc_last_four":"1732","cc_type":"MasterCard","id":451,"site_id":602,"updated_at":"2016-01-23T11:24:58-05:00"}]

I don't understand what the problem is.

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
CodeMilian
  • 1,262
  • 2
  • 17
  • 41

1 Answers1

-1

The problem might be with your server side code. Once look at this example.

     $http.jsonp("http://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero").
  success(function(data) {
    $scope.data = data;
    $scope.name = data.name;
    $scope.salutation = data.salutation;
    $scope.greeting = data.greeting;
))
Murali
  • 409
  • 11
  • 17