angular-phonecat icon indicating copy to clipboard operation
angular-phonecat copied to clipboard

Level 5 CORS issue in Chrome

Open DaveLindberg opened this issue 11 years ago • 2 comments

Flummoxed.

The Level 5 code works in Safari and other browsers, but I've run into a CORS issue with Chrome that I can't get around. End to end and unit tests pass, but the JSON data will not display.

XMLHttpRequest cannot load file://localhost/Applications/MAMP/htdocs/angular-phonecat/app/phones/phones.json. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.

I understand this is not an Angular issue per se, but hope I might find a workable solution here to complete the tutorial.

DaveLindberg avatar Mar 11 '15 13:03 DaveLindberg

@DaveLindberg you should be running an app from a web server as described instead off the file system.

pkozlowski-opensource avatar Mar 11 '15 13:03 pkozlowski-opensource

Oh. Right. Thank you, that's exactly what I was missing. :-)

DaveLindberg avatar Mar 11 '15 13:03 DaveLindberg