title: AngularJS - $http get returns error with status 0?
body: <p>I've an AngularJS application in which I'm trying to get an XML data with $http get from a server say <a href="http://example.com/a/b/c/d/getDetails?fname=abc&amp;lname=def">http://example.com/a/b/c/d/getDetails?fname=abc&amp;lname=def</a> (this when accessed manually by entering the link in a browser shows a tree structure of the XML file).</p>
  
  <p>When I run the application the data from that link is not fetched. Instead its showing an error with <strong>status 0</strong>.</p>
  
  <pre><code>//url = http://example.com/a/b/c/d/getDetails?fname=abc&amp;lname=def
  $http.get(url).success(function (data){
                  alert("Success");
                  deferred.resolve(data);
              }).error(function (data, status){
                  console.log("Error status : " + status);
              });
  </code></pre>
  
  <p>I'm not sure why the $http.get fails and goes to the error function returning status 0.</p>
  
  <p>But if I pass an URL to the local server which has a JSON object, it works.</p>
  
  <p>Is the problem because of me trying to access the XML file from a different domain(CORS issue?) or something else?</p>
  
  <p>Please help me out!</p>