https://www.cnblogs.com/doforfuture/p/5641909.html
http://blog.csdn.net/fengzijinliang/article/details/51897991
https://www.cnblogs.com/jyybeam/p/6122346.html
用post提交,后台接收不到参数的问题
$http({
method:'post',
url:'post.php',
data:{name:"aaa",id:1,age:20},
headers:{'Content-Type': 'application/x-www-form-urlencoded'},
transformRequest: function(obj) {
var str = [];
for(var p in obj){
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
}
return str.join("&");
}
}).success(function(req){
console.log(req);
})