A meteor is built from a conductor type data structure. This means that the application first loads the HTML, and JS is sent first, and then later.
You must use reactivity to check for data changes or to verify that the subscription to the collection is complete (which entails the removal of the automatic publishing package). (You can check how to transfer the application to manual subscription in the documents: http://docs.meteor.com/#publishandsubscribe )
The subscription callback tells you when data is being returned:
Meteor.subscribe("coll", function() {
A template can also be made reactive (for example, the way you do it), but .rendered not called because Meteor first checks to see if the html template has changed, and only if it is different will it change its HTML and call the displayed callback.
What you have as an option here: 1) instead of Deps.autorun or
2) I'm not sure why you use this in your callback, but if you need to put it there, you need to make sure that the HTML template changes by entering something into the html from your collection, changes it when you enter new data.
source share