angular使用jquery ajax方式提交表單解決辦法

angular 默認使用的是application/json方式提交,如果需要兼容以前的老系統 需要這樣更改 ,記錄一下

$http({
method : 'POST',
url : url,
data : $.param(postData),
headers : {
'Content-Type' : 'application/x-www-form-urlencoded'
}
}).success(function(data) {

return ;
}

});



</pre><br /><br />

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章