原文:Angular http跨域 - 飞翔的小仓鼠 - 博客园
var app = angular.module(‘Mywind‘,[‘ui.router‘]);
app.controller(‘Myautumn‘,function($scope,$http,$filter){
//$http跨域
//服务端设置
// 访问权限 response.setHeader("Access-Control-Allow-Origin", "*");
// 访问类型 response.setHeader("Access-Control-Allow-Methods","POST");
// 响应头 response.setHeader("Access-Control-Allow-Headers","x-requested-with,content-type");
// $http.post(
// ‘url‘,
// {languageColumn:‘name_eu‘},
// {‘Content-Type‘:‘application/x-www-form-urlencoded‘}).success(function(data){
// $scope.industries = data;
// });
});