I'm using $ http from angular to make REST calls on my server, however I'm having a problem:
In 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
I have tried several things, but nothing has solved me, does anyone know how to solve?
My Code:
.factory('CotacaoService', ['$http', function($http){
var cotacao = [];
$http({
method: 'GET',
url: 'http://192.168.254.8:8084/CotacaoREST/recursos/cotacoes/1/991'
}).then(function successCallback(response) {
cotacao = response.data;
}, function errorCallback(response) {
console.log(response);
});
return cotacao;
}]);