标签:
mainApp.config(function($httpProvider){ $httpProvider.defaults.transformRequest = function(obj){ var str = []; for(var p in obj){ str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); } return str.join("&"); } $httpProvider.defaults.headers.post = { ‘Content-Type‘: ‘application/x-www-form-urlencoded‘ } });
关于angularjs中ajax请求php接口参数个是转换的问题
标签:
原文地址:http://www.cnblogs.com/zboy/p/5941542.html