angular的$http问题,求帮助

abc_delphi 2017-08-28 01:08:18
小弟初学angular,但是许多不懂,有些问题可以网上找,但这次是实在不知道怎么办了,不知道为什么会输出那些东西,求救。。
var user = {};
$scope.register = function(){
user.username=$scope.username;
user.name=$scope.name;
user.password=$scope.password;
$http.defaults.headers.post = {
'Content-Type': 'application/x-www-form-urlencoded'
};
$http.post("php/register.php",{
params: user
}).success(function(response){
console.log(response);
}).error(function(){
console.log(111);
})
};
控制台显示的是下面的内容:
...全文
119 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
abc_delphi 2017-08-28
  • 打赏
  • 举报
回复
在网上搜索了一下,说是文件有中文名的问题,我修改成英文后运行还是出现这个错误

87,994

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧