Hello Garry.
I've tried but didn't work. I might guess I need to define/get the id+rev
somehow? I'm completely stuck at this point. I've seen people use
Resource,Factories and stuff like that. Is it neccessary for this? Thanks a
lot btw.
Regards,
Mathias
Den tirsdag den 20. maj 2014 18.25.06 UTC+2 skrev Garry Taylor:
>
> 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.