原文: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;
//});
});
Angular http跨域
原文地址:https://www.cnblogs.com/520future/p/8338194.html