• function


Insert the property name of an Object or attribute name of a can.Map that we iterate over with #each


Use {{@key}} to render the property or attribute name of an Object or can.Map, when iterating over it with #each. For example,

The template:

  {{#each person}}
    <li> {{@key}}: {{.}} </li>

Rendered with:

{ person: {name: 'Josh', age: 27, likes: 'Stache, JavaScript, High Fives'} }


  <li> name: Josh </li>
  <li> age: 27 </li>
  <li> likes: Stache, JavaScript, High Fives </li>