javascript - Meteor : wait until all templates are rendered -
i have following template code <template name="home"> <div class="mainbox"> <ul class="itemlist"> {{#each this}} {{> listitem}} {{/each}} </ul> </div> </template> <template name="listitem"> <li class="item"> {{username}} </li> </template> and i'd execute code once of "listitem" rendered. there 100 of them. tried following template.home.rendered = function() { // called once of 'subviews' rendered? }; but doesn't wait until views loaded. what's best way of knowing when sub-view templates loaded? this how proceed : client/views/home/home.html <template name="home"> {{#if itemsready}} {{> itemslist}} {{/if}} </template> <template name="itemslist"> <ul> {{#each items}} {{...