What should I use to filter backbonejs Collection on the server?

I want to filter my base collection on the server side?

Current I pass the request parameters through the data:

Books.fetch({data: {published: true, page: 3}}) 

Is there a better way to do this?

+4
source share
1 answer
 Books.filter(function (book) { return filterCondition(book); }).fetch(); 

Filter your collection into the books you need, and then call the selection in the new collection.

0
source

Source: https://habr.com/ru/post/1391438/


All Articles