嗨,当我发布到已部署时,我在控制台中收到了这个奇怪的错误
Object {name: "MongoError", message: "key $$hashKey must not start with '$'", status: 400}
代码
dpd.timesheetsdone.post({
"projectId": $scope.projectId ,
"formandSig": $scope.signature,
"timesheets": $scope.timesheets
}, function (result, err) {
if (err) return console.log(err);
console.log(result, result.id);
});
项目 id 和签名是一个简单的字符串,timesheets 是一个数组
如果我将 scope.timesheets 替换为
[
{
"projectId": "1000",
"date": "2015-05-15T22:00:00.000Z",
"start": "25200"
}
]
有用..
onsole.log(scope.timesheet... 返回具有相同值 + 和哈希键的对象