Skip to content

Instantly share code, notes, and snippets.

@patcoll
Created July 26, 2016 18:18
Show Gist options
  • Save patcoll/556b954fdd35d3199f3a607e9b2b7dad to your computer and use it in GitHub Desktop.
Save patcoll/556b954fdd35d3199f3a607e9b2b7dad to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
click() {
alert('will not run');
},
object: {
attribute: 'value'
},
attributeBindings: ['id'],
id: function() {
return `object-${this.get('object.attribute')}`;
}.property('object.attribute')
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{#my-component}}
anything can be in here
{{/my-component}}
<br>
<br>
{
"version": "0.10.1",
"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.6.0",
"ember-data": "2.6.1",
"ember-template-compiler": "2.6.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment