ember-group-by icon indicating copy to clipboard operation
ember-group-by copied to clipboard

Nested Model Values

Open bmx269 opened this issue 7 years ago • 0 comments

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}}

bmx269 avatar Apr 12 '17 08:04 bmx269