I want to get additional records from the server after user clicks button “Load more”.
By default I show for example 10 items, if user clicks “Load more” I pull additional 10 items from server and append them to previous 10.
So, in total user has 20 items in local Meteor collection.
If user clicks “Load more again”, additional 10 items are loaded using conditional subscription and “Items” collection on the Client will have 30 records.
The problem is that after moving to another template(page) all those subscribed items remain in local Client “Items” collection.
Is it possible somehow to remove loaded items from Client collection?
Template.items.events 'click #loadMore': (event, template) -> itemsQuery = ... Meteor.subscribe "loadMoreItems", itemsQuery , (err, onReady) -> ... additionalItems = Items.find query, options ...