title: KnockoutJS afterRender callback when all nested Components have been rendered?
body: <p>I have a hierarchy of nested KnockoutJS Components using 3.2.0. It's working very well but I'm looking to execute some code once my entire hierarchy of components has been loaded and rendered. It's a rough equivalent of afterRender(), needed for the same common uses cases as afterRender.</p>
  
  <p>I've tried a few approaches but no luck so far:</p>
  
  <ol>
  <li>Added the following to the root template but it gets called before the nested components are loaded, so too early.
  <code>
  &lt;!--ko template: {afterRender: onLoad.bind($data)} --&gt;
  </code></li>
  <li>Using the latest 3.3.0-alpha and specifying synchronous:true on all components. But I believe since I'm using AMD, the components are still 'loaded' asynchronously which mean that just because my root applyBindings() returns, doesn't mean that all components have been loaded and rendered.</li>
  <li>Even tried building a collection of deferred objects that get resolved only when their corresponding components are loaded.  This got overly complicated and still didn't work for reasons I won't go into.</li>
  </ol>
  
  <p>Is there a way to get a callback called once a complete hierarchy of knockoutjs components have been loaded and rendered? Thanks!</p>
  
  <p>I just came across these two threads so it seems others are looking for this as well.  The key differentiator from the existing workarounds are they don't work with nested components.</p>
  
  <ul>
  <li><a href="https://github.com/knockout/knockout/issues/1533">https://github.com/knockout/knockout/issues/1533</a></li>
  <li><a href="https://github.com/knockout/knockout/issues/1475">https://github.com/knockout/knockout/issues/1475</a></li>
  </ul>