Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested Model Values #14

Open
bmx269 opened this issue Apr 12, 2017 · 0 comments
Open

Nested Model Values #14

bmx269 opened this issue Apr 12, 2017 · 0 comments

Comments

@bmx269
Copy link

bmx269 commented Apr 12, 2017

I am using the group-by to show referenced items, but I am unable to load data from the related model. The item loads the data if there is only 1 item in the array, but when there are more, I am unable to show that data.

{{#each (take 5 (sort-by "items.length:desc" votesByItem)) as |group index|}}
   {{#each (take 1 group.items) as |vote|}}
      <div class="item item-{{index}}">
         <div class="image" style="{{vote.fieldItemRef.fieldImage.itemBackground}}">  
         </div>
         <div class="title">
            <span>{{vote.fieldItemRef.title}}</span>
        </div>
     </div>   
  {{/each}}
{{/each}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant