こんにちは、デプロイ済みに投稿すると、コンソールにこの奇妙なエラーが表示されます
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 と署名は単純な文字列、タイムシートは配列です
scope.timesheets を次のように置き換えた場合
[
{
"projectId": "1000",
"date": "2015-05-15T22:00:00.000Z",
"start": "25200"
}
]
できます..
onsole.log(scope.timesheet... は、同じ値 + とハッシュ キーを持つオブジェクトを返します