title: XMLHttpRequest cannot load file error in Angular js
body: <p>While debugging an Angular js application in webStorm IDE the following error occurs </p>
  
  <p>XMLHttpRequest cannot load file:///C:/Users/../list.html. Cross origin requests are only supported for HTTP.</p>
  
  <p>Javascript code : </p>
  
  <pre><code>var amailServices = angular.module('Amail',['ngRoute']);
  function emailRouteConfig($routeProvider) {
  $routeProvider.
      when('/', {
          controller: ListController,
          templateUrl : 'list.html'}).
  
      when('/view/:id',{
          controller : DetailsController,
          templateUrl:'detail.html'}).
  
      otherwise({
          redirectTo:'/'
      });
  }
  amailServices.config(emailRouteConfig);
  </code></pre>
  
  <p>How to fix this </p>