Remove collection from model RacerJS?

136 Views Asked by At

This is my client Side code:

model.remove('agent',{'text':'online'});

I cant able to remove collection from model,Its shows following error in console

Error: remove must be performed under a collection and document id. Invalid path: agent
1

There are 1 best solutions below

0
On BEST ANSWER

From the documentation, it looks like 'path' should be the collectionname.id. In this case, maybe I suppose it should be 'agent.id'.

This blog refers that the path should be in the format collection.documentId.document.

http://blog.derbyjs.com/2012/04/13/derby-v0-dot-3-0/