前端之家收集整理的这篇文章主要介绍了
AngularJS----Post,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
angular.module('MetronicApp').controller('PhoneListCtrl',function PhoneListCtrl($scope,$http) {
$http({
method: 'POST',url: "http://192.168.0.1:8003/api/Account/Authenticate",data: {
TenancyName: "Default",UsernameOrEmailAddress: "admin",Password: "123qwe2"
},headers: {
"Content-Type": "application/json"
}
})
.success(function(data) {
console.log(data);
}).error(function(data) {
console.log(data);
});
});
原文链接:https://www.f2er.com/angularjs/148831.html