Category Archives: angularjs-directive

How to configure Apache 2 to allow access to files on local drives of computer?

I'm doing a project where I'm using directives characteristic of AngularJS. Code of my directive looks like this:

app.directive('programListing', function() {
    return {
        restrict:'E',
        scope: {
            listing:'='
        },
        templateUrl:'js/directives/programListing.html' 
    };
});

Whenever I try to load index.html on Chrome it gives: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource. error. I tried loading index.html through Apache server 2 but it gives: Not allowed to load local resource error, due to the fact that my index.html file contains some images from local drives. So, how to configure Apache 2 so that it access files from local drives of my computer, so that I can do my work offline too. Thanks in advance!! :-)