1

While debugging an Angular js application in webStorm IDE the following error occurs

XMLHttpRequest cannot load file:///C:/Users/../list.html. Cross origin requests are only supported for HTTP.

Javascript 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);

How to fix this

1 Answer 1

1

It was a fix in web storm IDE .

I changed the server to http://localhost:63342/

Now it works fine in debugging

Sign up to request clarification or add additional context in comments.

Comments