title: Access Control Origin not Allowed
body: <p>I am facing "Access Control Origin not Allowed" issue in AngularJS and based on <a href="https://stackoverflow.com/questions/17756550/angularjs-cors-issues">AngularJS CORS Issues</a> I have added following lines in my code:</p>
  
  <pre><code>angular.module('app', [
      'ngRoute',
      'appModules.filters',
      'appModules.ajaxCallService'
  ])
  .config(['$routeProvider', '$httpProvider', function($routeProvider, $httpProvider) {
  
      $httpProvider.defaults.useXDomain = true;
      delete $httpProvider.defaults.headers.common['X-Requested-With'];
  
      $routeProvider.when('/login', {templateUrl: 'views/login.html', controller: 'LoginCtrl'});
  }]);
  </code></pre>
  
  <p>But still I am facing issue:</p>
  
  <blockquote>
    <p><code>XMLHttpRequest cannot load http://127.0.0.1:8000/login. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.</code></p>
  </blockquote>
  
  <p>Can anyone help me to solve this issue?</p>
  
  <p>Even using localhost in URL I am getting same issue</p>
  
  <blockquote>
    <p><code>XMLHttpRequest cannot load http://localhost:8000/login. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.</code></p>
  </blockquote>
  
  <p>I am using AngularJS version 1.2.16 and expressJS with 0.10.26 nodejs.</p>