title: Nested Views in Ember
body: <p>I've got the need for a recursive nested set of views in Ember. Basically think of it as a file structure with folders.</p>
  
  <p>I thought I could do it with <code>render</code>, but that didn't work. Inside <code>structures/show</code> view:</p>
  
  <pre><code>{{#each child in structures}}
    {{ render 'structures/show' child }}
  {{/each}}
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>Uncaught Error: assertion failed: This view is already rendered 
  </code></pre>
  
  <p>I read in another <a href="https://stackoverflow.com/questions/9962647/recursive-view-in-handlebars-template-not-working-after-upgrading-to-ember-0-9-6">SO Question</a> about using the <code>{{view}}</code> helper:</p>
  
  <pre><code>{{#each child in structure.structures}}
    {{ view App.StructuresShowView structureBinding='child'}}&lt;br&gt;
  {{/each}}
  </code></pre>
  
  <p>But this doesn't render properly. Possibly because the example is too old?</p>
  
  <p>How do I properly render the same view (and controller?) with a different object in order to build a nested/recursive view? Is there a better way than the object directions?</p>
  
  <p>Thanks.</p>
  
  <hr>
  
  <p>Update. Looks like <a href="https://github.com/emberjs/ember.js/issues/1637" rel="nofollow noreferrer">itemControllerClass</a> might be what I'm looking for? Still trying to figure it out.</p>