Hello, I have a MongoLab database with a collection 'basket' containing a document:
{ articleID:12345, quantity: 4 } I want to update this document so the quantity is 2. I use a REST service in Angular (the $http service): return $http({ method: "PUT", url: AppConstants.MONGODB_SHOPPINGCART_BASKET_URL + '?apiKey=' + AppConstants.MONGODB_API_KEY, data: JSON.stringify({"$set" : {"quantity" : newQty}}), contentType: "application/json", q:{"$where" : {"articleID": articleID}} }); 'articleID' resolves to '12345', 'url' to the document in MongoLab (database->collection->basket). In FireBug I can see the PUT statement is executed with the data in the body. But there is nothing updated. The document still contains quantity:4 instead of 2. The url only contains the API key, no q parameter. I guess Angular should add that? What is wrong here? -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.