Skip to content

Instantly share code, notes, and snippets.

@andybluntish
Created January 25, 2017 00:50
Show Gist options
  • Save andybluntish/c388b269350f0e96bdfd5ff2c8f38624 to your computer and use it in GitHub Desktop.
Save andybluntish/c388b269350f0e96bdfd5ff2c8f38624 to your computer and use it in GitHub Desktop.
Array Props in Ember
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
intList: [10, 34, 49],
objList: [
{ foo: 'bar' },
{ foo: 'bat' },
{ foo: 'qux' }
]
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<p>{{intList.[1]}}</p>
<p>{{objList.[1].foo}}</p>
<br>
<br>
{
"version": "0.11.0",
"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.10.2",
"ember-data": "2.11.0",
"ember-template-compiler": "2.10.2",
"ember-testing": "2.10.2"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment