Hey guys, any idea how I can resolve this error I get when I try to access the PI using angular? Here's my code:
http({method: 'GET', url: url, dataType: 'json'})
.then(function(response) {
scope.data = response.results;
console.log(scope.data);
}).catch(function(response){
console.log(response);
});
Then I get this error: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:9000' is therefore not allowed access.
I'm running a node server with grunt on my local in this instance. Are there certain headers I need to be setting that I'm not aware of?
Thanks
Log in to comment