How do I ground (using ground:db) a collection to get offline access?
I’m trying this, but it doesn’t work at all… I think there is a problem with export
, as it doesn’t seems to be correct?!
/imports/api/cars/collection.js
export default Cars = new Mongo.Collection('cars');
if (Meteor.isCordova)
Ground.Collection(Cars);
Cars.deny({
insert() { return true; },
update() { return true; },
remove() { return true; }
});
/imports/ui/cars/list.js
import Cars from '/imports/api/cars/collection.js';
Template.example.helpers({
list() {
return Cars.find({});
}
});