625 B
625 B
title | localeTitle |
---|---|
Fixing Exportsupdate in Angular | 在Angular中修复Exportsupdate |
事实证明,在thing.controller.js以及在可能产生的任何其它端点,这就是所谓的_exports.update_功能,当您从您的前端修改现有的数据库对象_$ http.put_电话坏了。这是一个已知问题 ,可以通过更改以下行来修复:
// Updates an existing thing in the DB.
exports.update = function(req, res) {
...
var updated = _.extend(thing, req.body);
// change _.merge to _.extend
...
};