Nodejs plus angularjs report an error when writing a post request.

  node.js, question

Front-end controller code:

userAction.controller('login', function($scope, $http){
 $scope.processForm = function(){
 /*var obj = {
 username: $scope.formData.username,
 password: $scope.formData.password
 url: '/login',
 method: 'post',
 data: $.param($scope.formData),
 header: ("Content-Type", "application/x-www-form-urlencoded")

The error reported at this time is as follows:


If the transmitted data uses obj object in Figure 1, no error will be reported. May I ask Why is this?

It is estimated that the parameter type is wrong. Look at this:Problems and Solutions Encountered in Building Applications with AngularJS (Version 1.3.9)