How to configure Angular $resource (ngResource) to pull data from another domain using CORS
问题 I'd like to be able to setup resources using $resource using CORS to request my data. I've got CORS working with $http but the same techniques don't apply to $resource and I was hoping someone can come to my rescue and show me how with $resource. I've modified the last step of the Angular tutorial to use CORS by hacking the phonecatServices service, in the services.js file. I found this example which uses the $http.defaults.useXDomain = true; delete $http.defaults.headers.common['X-Requested