title: Cross-domain $http request AngularJS
body: <p>I have simple website I'm building with AngularJS which calls an API for json data. </p>
  
  <p>However I am getting Cross domain origin problem is there anyway around this to allow for cross domain requests?</p>
  
  <p>Error:</p>
  
  <p>XMLHttpRequest cannot load <a href="http://api.nestoria.co.uk/api?country=uk&amp;pretty=1&amp;action=search_listings&amp;place_name=soho&amp;encoding=json&amp;listing_type=rent">http://api.nestoria.co.uk/api?country=uk&amp;pretty=1&amp;action=search_listings&amp;place_name=soho&amp;encoding=json&amp;listing_type=rent</a>. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http:// localhost' is therefore not allowed access. </p>
  
  <pre><code>  searchByPlaceName: function() { 
          var url = baseurl+'country=uk&amp;pretty=1&amp;action=search_listings&amp;place_name=london'+encoding+type;
           return $http.get(url);
      }
  </code></pre>