This package provides new onSubscribed
and onDataChanged
callbacks.
meteor add utilities:onsubscribed
Gets called whenever a template's subscriptions are done loading.
Template.myTemplate.onCreated(function () {
this.subscribe("mySubscription");
});
Template.myTemplate.onSubscribed(function () {
console.log("subscription done!");
});
Gets called whenever a template's data context changes.
Template.myTemplate.onDataChanged(function () {
console.log("data context changed!");
});