I'm leaning Angular, trying to use HTTP get to a file on my PC. I want to simulate the server scenario so tried serving the file with the following, (live-server, browser-sync & xampp) one at a time, but with every try I get the error
Failed to load http://localhost/ng-data/products.json: The 'Access-Control-Allow-Origin' header has a value 'http://localhost:4200/' that is not equal to the supplied origin. Origin 'http://localhost:4200' is therefore not allowed access
When I paste the url (http://localhost/ng-data/products.json) in my browser I can get the file.
No comments:
Post a Comment