Angularjs 400(错误请求)错误+;有棱角的

Angularjs 400(错误请求)错误+;有棱角的,angularjs,http,post,Angularjs,Http,Post,我在角度应用程序中收到400(错误请求)错误 提交用户详细信息customerLoginController.js:10 POSThttp://localhost:8080/login400(错误请求)angular.min.js:77 上传错误 现在发生的事情是,我可以看到我的console.log正在通过,但是客户用户名和密码的数据没有通过 我的代码在此表单中,然后在我的控制器中: <div class="loginForm" ng-controller="customerLoginC

我在角度应用程序中收到400(错误请求)错误

提交用户详细信息customerLoginController.js:10 POST
http://localhost:8080/login
400(错误请求)angular.min.js:77 上传错误

现在发生的事情是,我可以看到我的console.log正在通过,但是客户用户名和密码的数据没有通过

我的代码在此表单中,然后在我的控制器中:

<div class="loginForm" ng-controller="customerLoginController">
    <form method="POST">
        Username: <br /> 
        <input type="text" placeholder="Enter your username" ng-model="customer.username" /><br /><br />

        Password: <br /> 
        <input type="password" placeholder="Enter your password" ng-model="customer.password" />

        <span class="promptDetails" ng-click="getUserCredentials()"><a ui-sref="#" class="fetchLogDetails">Forgot login details</a></span>
        <br />
        <input type="button" id="loginUser" value="Login" ng-click="login(customer)" />
    </form>
</div><!-- End login form -->

您如何处理服务器端的登录?请发布服务器端登录处理程序,以便我们进行调试。
angular
.module('customerProfile')
.controller('customerLoginController', function($scope, $http, $location) {
    $scope.customer = {
        username: '',
        password: ''
    },

    $scope.login = function(customer) {
        console.log("Submitting user details");
            $http.post('http://localhost:8080/login', customer)
            .success(function(data, status, headers, config) {
                console.log(msg.data);
            })
            .error(function() {
                console.log("Error in upload");
            })


    };

})