Hi Marthias, try
http.delete('http://localhost:5984/customers/'
<http://localhost:5984/customers/%7B%7B#_id%7D%7D?rev=%7B%7B%23_rev%7D%7D>+ id
+
'?#rev<http://localhost:5984/customers/%7B%7B#_id%7D%7D?rev=%7B%7B%23_rev%7D%7D>'
+ rev).then( function() { alert('Deleted!'); });
regards,
Garry Taylor
On Tuesday, 20 May 2014 16:26:29 UTC+1, Mathias Christensen wrote:
>
> Hello everyone!
>
> I'm using couchdb to store some data from my newly project. I need help to
> configure my delete button. My code right now are very basic, I've tried so
> many things now:
>
>
> $scope.removeCustomer = function (id) {
>
> http.delete('
> http://localhost:5984/customers/{{#_id}}?rev={{#_rev}}',
> id).then(alert('Deleted!')
> )
> };
>
>
> When I fill the doc ID and Rev it deletes the doc from couchdb. But I need
> to bind the id and rev by itself. Can you please help me?
>
> Regards,
>
> Mathias
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.