【发布时间】:2017-09-01 15:38:45
【问题描述】:
我收到以下错误**(angular.js:14525 TypeError: $http.post(...).success is not a function atChildScope.BindingCode.$scope.Submit (ClientSide.html:36) at fn (eval at compile (angular.js:15358), :4:138))** 在执行这段代码时。这段代码将对象发送到 asp.net webapi,并在处理后取回数据-
$scope.Submit = function () {
if($scope.Customer.CustomerName.length==0)
{
alert("Not a proper data");
}
else
{
$http.post("http://localhost:59040/api/Customer", $scope.Customer).
success(function (data) {
$scope.Customer = data;
});
}
}
【问题讨论】:
标签: angularjs asp.net-mvc asp.net-web-api