I have a question that I have been trying to find a solution for, but nevertheless it has not been entirely clear to me, I have an application made in AngularJS that consumes a JSON from an external source , the detail is the following I'm using the service $resource
to make the get
however I get error cors:
However when I use Jquery with the functions $.ajax
or $.getJSON
I do not get a Cors error? Why is this behavior?
I leave the screenshots of the code:
Request with ajax
of Jquery gives 200
:
My question is: with the functions of ajax
and getJSON
of Jquery does not generate error of Cors and with the service $resource
yes?