Meteor_angularjs icon indicating copy to clipboard operation
Meteor_angularjs copied to clipboard

Need to remove $$hashKey property on objects to store in MongoDB

Open ghost opened this issue 12 years ago • 1 comments

AngularJS adds $$hashKey property on objects listed in a ng-repeat directive. When we use $resource, $http or angular.toJson AngularJS removes this transient property but when we use Meteor insert this property is not removed and it failed on MongoDB insert with this error : at _Mongo.insert (app/packages/mongo-livedata/mongo_driver.js:172:8) Exception while invoking method '/annonces/insert' Error: key $$hashKey must not start with '$

The fix must be recursive on the object properties to insert.

ghost avatar Mar 23 '13 15:03 ghost

See merge request https://github.com/lvbreda/Meteor_angularjs/pull/28

ghost avatar Mar 23 '13 16:03 ghost