angularJs 的$http的post怎么用的

2025-03-29 20:48:26
推荐回答(1个)
回答1:

$http({
method: 'POST',
url: '/someUrl'
}).then(function successCallback(response) {
// success
}, function errorCallback(response) {
// error
});

或者
$http.post('/someUrl', data, config).then(successCallback, errorCallback);