title: How to resolve CORS ie same origin policy in angularjs
body: <p>I am developing a mobile application in angularjs where I have to make call to web service. But, when I am making the call with <code>$http.get</code> it is giving the following error.</p>
  
  <pre><code>XMLHttpRequest cannot load http://example.com/First_Step.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8020' is therefore not allowed access. 
  </code></pre>
  
  <p>My function for this is as follows:</p>
  
  <pre><code>$scope.firstStepClick = function() {
      appSvc.selectedItem = "firstStep";
      $rootScope.go('parent/firststep', 'slideLeft');
      delete $http.defaults.headers.common['X-Requested-With'];            
      $http.get("http://example.com/First_Step.json").success(function(data) {
          $scope.firstStepData = data;
      }).error(function() {
          alert("an unexpected error occured");
      });
  };
  </code></pre>
  
  <p>So, please help me to solve this CORS problem. I am using html5, css3 and angularjs for this mobile app development.</p>
  
  <p>Thanks in advance</p>