$http.get() Error ‘Access-Control-Allow-Origin’
<p>I have to work with the API rest but i have this error every time whenever do?</p>

<p>Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost:8100" rel="nofollow">http://localhost:8100</a>' is therefore not allowed access.</p>

<pre><code>$scope.submit = function(login, password){
url = 'http://x.x.x.x:x/x/x/x/x/'+login+'?password='+password;
console.log(url);
instanceId = '1';
tokenId = '';
userId = '';
$http.get(url, {
      headers: {
        'Accept': 'application/json',
        'Context': 'instance='+tokenId+';token='+tokenId+';user='+userId
      }
  })
  .success(function(data){
    $scope.firstName = data.user.firstName;
    $scope.lastName = data.user.lastName;
    $scope.profession = data.user.mission;

    userId = data.user.id;*/
    localStorage.setItem("userId", JSON.stringify(userId));
    $location.path('app/home/');
  })
  .error(function(data, status){
    console.log(data + "-" + status);
    alert(status);
});
</code></pre>