title: Using JSONP method for $http service in AngularJS
body: <p>I'm a relative newbie to AngularJS, and having successfully used the GET method of $http for a basic proof-of-concept app, I'm now trying to use the JSONP method to pull some JSON from a remote URL I've been given. I've created a basic plunker here to show what I'm trying to do: <a href="http://plnkr.co/edit/Joud0ukAzhgvNM0h9KjB?p=preview" rel="nofollow">http://plnkr.co/edit/Joud0ukAzhgvNM0h9KjB?p=preview</a></p>
  
  <p>I'm using an HTTP request inside my controller like this:</p>
  
  <pre><code>    $http({method: 'jsonp', url: 'http://ec2-54-229-49-250.eu-west-1.compute.amazonaws.com/country?callback=JSON_CALLBACK'}).
    success(function(data) {
      $scope.countries = data;
      console.log('success');
    }).
    error(function(data) {
      console.log('error');
    });    
  </code></pre>
  
  <p>...but I'm getting nothing back at all (except 'error' in the console). I know the URL is returning valid JSON ( <a href="http://ec2-54-229-49-250.eu-west-1.compute.amazonaws.com/country?callback=angular.callbacks._0" rel="nofollow">http://ec2-54-229-49-250.eu-west-1.compute.amazonaws.com/country?callback=angular.callbacks._0</a> ), but I'm just not getting anything back...</p>