meteor-admin icon indicating copy to clipboard operation
meteor-admin copied to clipboard

Meteor 1.3: Remove need for global objects for collections

Open neil-s opened this issue 8 years ago • 5 comments

In Meteor 1.3, the suggested code style is to move collection definitions into imports, and then import them where necessary. This package seems to rely on the collections being declared as global objects. Is there a way to workaround for this, or will the package need to add a new option in the configuration, allowing us to pass in the collection object rather than looking it up in the globals based on name?

neil-s avatar Apr 17 '16 17:04 neil-s

+1 for this, imports is much clear and safer

fangj99 avatar May 25 '16 22:05 fangj99

+1 I'm trying to get meteor-admin working with meteor 1.3 and without an import for AdminConfig I'm not sure how to get things rolling. Any direction would be helpful. Thanks!

bartspedden avatar Jun 15 '16 12:06 bartspedden

I'm having trouble with this. What are people doing for this?

avishaan avatar Aug 05 '16 23:08 avishaan

Do you have any idea how to make it work ?

aessig avatar Oct 07 '16 22:10 aessig

AdminConfig = {
  collections: {
    Posts: {
      collectionObject: Posts,
      // ...
    } 
  }
};

m-pokrovskii avatar Jun 06 '17 14:06 m-pokrovskii