I am using AngularJs I send req.body
form controller to server and get req.body
but I get an error:
Cannot read property 'CHKPWD' of undefined
Code:
var checkuserpassword = 123;
var CurrentPWD = 123;
$http.post('/Header/ChangeCheckPassword', {
'CHKPWD': checkuserpassword ,
'CURRENTPWD':CurrentPWD
}).then(function (response) {});
Server
exports.postcheckpwd = (req, res) => {
var checkuserpwd : req.body.CHKPWD;
var currentpassword: req.body.CURRENTPWD;
console.log(checkuserpwd );
console.log(currentpassword);
}
via jose
No comments:
Post a Comment