title: angularjs cros get json ,parse error
body: <p>I try to use angularjs $http.get to get json.
  My Server has cros and in fact ,if I just open the url in browser, it's correct .
  I use firefox, this is my screenshot:
  <a href="https://i.stack.imgur.com/VgwnU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VgwnU.png" alt="enter image description here"></a></p>
  
  <p>the error:
  <a href="https://i.stack.imgur.com/iLK8w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iLK8w.png" alt="enter image description here"></a></p>
  
  <p>you see the first OPTIONS succeeds.
  Here is my js code</p>
  
  <pre><code>var single=angular.module('searchSingle', []);
  
  single.controller('name',  function($scope,$http){
  
  var url='http://115.159.97.98/php/stocks.php';
  estimate=function (){
      $http.get(url).success(function (data,status){
          alert("aa");
      }).error(function(){
      });
  }
  
  $scope.$watch('searchHelper', estimate);
  });
  </code></pre>
  
  <p>The result is it jumps to the error function, and as you see in the screenshot, it trans only 0KB and the real response is 200+KB.
  Another thing is if I use $http.jsonp, it can trans 200+KB but also jumps to the error function 
  and the server code is:
  <a href="https://i.stack.imgur.com/SSWKG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SSWKG.png" alt="enter image description here"></a></p>