CORS com AngularJS

var myApp = angular.module('myApp', []);

myApp
.config(['$httpProvider', function($httpProvider) {
$httpProvider
.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
}
]);