I must be missing something really stupidly simple. Given this code:
<ul class="items">
{{#each listOfItems}}
<li>Thing {{name}}</li>
{{/each}}
</ul>
Template.myPage.onRendered({
console.log(this.find('ul.items > li'));
});
I’m getting a null
returned by console.log
. Why??
EDIT
Ok, I’ve figured out it’s because the {{#each}}
statement is still dumping out data after onRendered
gets called. Is there some callback I can use after all data on a page is done printing?