Giter Club home page Giter Club logo

meteor-local-persist's People

Contributors

jeffmitchel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

meteor-local-persist's Issues

Not working when we remove the application from device's memory.

Hi,
I have tried with this package with one of my Ionic-meteor application to get data persistence on device.
It gets data from server using Meteor DDP when device has network connection.

users = new Mongo.Collection('user');

this stores data into IndexedDB.
myPersistDiscussions = new PersistentMinimongo2(users, 'MyApp');

I have added one observer to keep data synced.
var myPersistDiscussionsObserver = new PersistentMinimongo2(users, 'MyApp');
Now I am able to get data from meteor collection named "users".

 $scope.listData = $meteor.collection(function() {
      return users.find();
 });

Issue :
It gets data from server using Meteor DDP when device has network connection.
It gets data from device's meteor collection (Cached data) when device has no network connection but application is in memory.
It is not getting data from persistent database when you removed the application from memory and internet connection is not available on device.

Please let me know if anybody has tried this thing or done successfully before.

Is this pkg only for client-side collections?

In my app, I wait for the subscriptions to finish before rendering. This takes a while on 3G, so I'd like to save the contents of the collections in localstorage, and on the next page load, restore from localstorage to Meteor.Collections and immediately render, and then call the subscriptions.

Remove dependency on jQuery

It would be nice to use this package without jQuery, the package is not that Dom traversal dependant so this should be super easy to fix.

Revivie your package

I would like to revive your package, as it seems fine to me. Either i will publish it under a new name, or you can add me as a collaborator, though i would like to change the name, to make it more findable (so i better publish a new one) :)

Just as a info

no persistence

Hello, When i test your example like this :


// 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.