However, when I use a simple each in my templates, I get all the records rendered: both parents and branches. This is my template:
templates/structure.hbs
{{#each row in controller}}
<li>{{row.description}}</li>
{{else}}
I wanted to implement a partial to print the nested rows in a recursive fashion. But I don’t how to handle the context switching for the each given it’s quite sophisticated. Or should I stop using the each helper and try to write one on my own?
I am indeed trying to have a row with many rows, as a recursive definition. I guess I am experimenting the undefined behavior now. If this is not valid, is there any strategy compatible with ember to tackle recursive relationships?
EDIT: I realized there is really no undefined behaviour when using recursive models. The issue I was experimenting was in the route when I loaded the model for the controller.