yogiben / meteor-admin

A complete admin dashboard solution
https://atmospherejs.com/yogiben/admin
GNU General Public License v3.0
826 stars 263 forks source link

Meteor 1.3: Remove need for global objects for collections #347

Open neil-s opened 8 years ago

neil-s commented 8 years ago

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?

fangj99 commented 8 years ago

+1 for this, imports is much clear and safer

bartspedden commented 8 years ago

+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!

avishaan commented 7 years ago

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

aessig commented 7 years ago

Do you have any idea how to make it work ?

m-pokrovskii commented 7 years ago
AdminConfig = {
  collections: {
    Posts: {
      collectionObject: Posts,
      // ...
    } 
  }
};