I am using firebase for my web and android app. Now, I am trying to call http GET function from firebase to retrieve data but it returns this error message
"Access to XMLHttpRequest at 'https://example.firebase.com' (redirected from 'https://example.firebase.com/') from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
$http.get('https://example.firebase.com').then(function(response){
$ctrl.tempData = response.data;
console.log('response data', response.data);
}
I found something called curl in somewhere else, but how to actually apply on this?
.json, since you're trying to access the REST API. So$http.get('https://example.firebase.com/.json')....