var userModel = new User();
userModel.email = req.body.email;
userModel.password = req.body.password;
userModel.save(function(err, user) {
.........
}
实际上我有一个名为'User'的模型,我必须为其创建实例,以临时存储其属性并将其保存为封装对象。但是我的控制器显示错误,如下所示..
throw message;
^
TypeError: object is not a function
是否可以像这样创作?