// create a local collection,
var shoppingCart = new Meteor.Collection('shopping-cart', {connection: null});
// create a local persistence observer
var shoppingCartObserver = new LocalPersist(shoppingCart, 'myShoppingApp');
shoppingCart.insert({ item: 'DMB-01'+Math.floor(Math.random() * 10), quantity: Math.floor(Math.random() * 10) });
console.log(shoppingCart.find({}).fetch())
when i refresh the page and fetch the collection, only the newly inserted data is returned by the fetch so there are no persistents data.
Hello, When i test your example like this :
when i refresh the page and fetch the collection, only the newly inserted data is returned by the fetch so there are no persistents data.