Meteor - data not available with Iron Router -
i trying achieve pretty simple: load template , fill data. however, template rendered several times, , first time null data. i found various posts issue stating rendering occurs every time subscription adds record clients database, , tried applying proposed solutions, still have first rendering without data. how can fix that? router.configure({ layouttemplate: 'layout', loadingtemplate: 'loading', notfoundtemplate: 'notfound' }); router.route('/team/:_id/cal', { name: 'calendar', waiton: function() { return [ meteor.subscribe('userteams',meteor.user()._id), meteor.subscribe('teamusers', this.params._id)]; }, action : function () { console.log("action:"+this.ready()); if (this.ready() && template.currentdata != null) { this.render(); } }, data: function(){ var team = teams.findone({_id:this.pa...