Templates.helpers.each-in()

each-inpublic

Defined in packages/ember-htmlbars/lib/helpers/each-in.js:8
Available since 2.1.0

The {{each-in}} helper loops over properties on an object. It is unbound, in that new (or removed) properties added to the target object will not be rendered.

For example, given a user object that looks like:

{
  "name": "Shelly Sails",
  "age": 42
}

This template would display all properties on the user object in a list:

<ul>
{{#each-in user as |key value|}}
  <li>{{key}}: {{value}}</li>
{{/each-in}}
</ul>

Outputting their name and age.

doc_EmberJs
2016-11-30 16:53:33
Comments
Leave a Comment

Please login to continue.