Meteor: How can I tell when the database is ready?

后端 未结 6 944
醉话见心
醉话见心 2020-12-01 11:39

I want to perform a Meteor collection query as soon as possible after page-load. The first thing I tried was something like this:

Games = new Meteor.Collecti         


        
6条回答
  •  日久生厌
    2020-12-01 11:46

    As of Meteor 1.0.4, there is a helper that tells you exactly when a particular subscription is ready: Template.instance().subscriptionsReady().

    Since this question is a duplicate, please check my answer in the original question, Displaying loader while meteor collection loads.

提交回复
热议问题