Displaying Relationships in Template


#1

This seems like it should be so easy, but it’s eluding me. Here’s the scenario, I’m making a site for a festival. There are many festival events, which have many performers. In my head, the template looks like this:

{{#each event in controller}}
  <h1>{{event.name}}</h1>
  {{#each performer in event.performers}}
    <h2>{{performer.name}}</h2>
  {{/each}}
{{/each}}

Obviously that doesn’t work. I’m using Ember data, and I’m preloading all the relationships beforehand, but I assume there’s some logic I’m missing in my route/controller. Any ideas?