Skip to content

Instantly share code, notes, and snippets.

@RyanHirsch
Created July 2, 2015 13:33
Show Gist options
  • Select an option

  • Save RyanHirsch/7630b5aeb88d279bde44 to your computer and use it in GitHub Desktop.

Select an option

Save RyanHirsch/7630b5aeb88d279bde44 to your computer and use it in GitHub Desktop.
{{#each}} key
{{#each ratings key="rater" as |rating|}}
<p>{{rating.rater}}</p>
<p>{{rating.rating}}</p>
<p>{{rating.confidence}}</p>
<hr/>
{{else}}
<p><em>No ratings for this employee</em></p>
{{/each}}
{{#each ratings key=rater as |rating|}}
<p>{{rating.rater}}</p>
<p>{{rating.rating}}</p>
<p>{{rating.confidence}}</p>
<hr/>
{{else}}
<p><em>No ratings for this employee</em></p>
{{/each}}
@RyanHirsch
Copy link
Author

I am running into an issue with with ember 1.13 and the key for an #each helper.

When using a quoted key I get the following error

Uncaught Error: You must provide a string key when callingyieldItem; you provided undefined

Why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment