Skip to content

Instantly share code, notes, and snippets.

@davidpett
Last active December 17, 2016 21:06
Show Gist options
  • Save davidpett/fea999573384a176c89a805750a5f1aa to your computer and use it in GitHub Desktop.
Save davidpett/fea999573384a176c89a805750a5f1aa to your computer and use it in GitHub Desktop.
2.9 array with hash
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<h1>Ember 2.9 array with hash</h1>
<ul>
{{#each (array (hash foo="foo1" bar="bar1") (hash foo="foo2" bar="bar2")) as |item|}}
<li>{{item.foo}} - {{item.bar}}</li>
{{/each}}
</ul>
{
"version": "0.10.6",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.9.0",
"ember-data": "2.9.0",
"ember-template-compiler": "2.9.0",
"ember-testing": "2.9.0"
},
"addons": {
"ember-composable-helpers": "1.1.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment