Skip to content

Instantly share code, notes, and snippets.

@morhook
Forked from ef4/components.my-component.js
Created February 21, 2017 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morhook/6b5309b38434f5247c12e4fc8470ff30 to your computer and use it in GitHub Desktop.
Save morhook/6b5309b38434f5247c12e4fc8470ff30 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
items: Ember.computed('value', function() {
return [this.get('value')];
})
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<p>Type in this box and Ember will throw exceptions:</p>
{{input value=message}}
<br>
{{my-component value=(hash title=message) }}
<br>
<br>
{{#each items as |item|}}
<div>{{item.title}}</div>
{{/each}}
{{inner-component items=items}}
{
"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.11.1",
"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