Backbone.localStorage
Backbone.localStorage copied to clipboard
Not fetching all models from collection
In my Backbone Marionette app I'm adding items to the localstorage successfully but it's not returning all the models.
In my case an item is added to my cart collection and this takes you to the cart page which should list all the items in the cart. The first item added works but when a second item is added and you are taken to the cart only the latest one show.
This also only seems to happen when navigating to the cart page using a trigger, if I cmd + R refresh the page the full collection is returned.
Bit confused as to what is going on.
OK I've found that if I set an id rather than using the guid it works as it should, sometimes i.e about 50%
Having the same problem, this seems to be random, sometimes, the full collection is returned, some other time, just a part of it. The full collection is in local storage. As dotdotdot mentionned, reloading the page the full collection is returned.
Same here, i've a collection. I add a model in it. Seems good on the View, I switch to an another view, fetch the collection, new models are missing. But if i refresh the page, my new models are here ....
EDIT : the remove works properly, but new items are missing. I must be doing wrong the add method...
Looks like is the same as #177