Skip to content

Instantly share code, notes, and snippets.

@emurillo510
Created October 26, 2016 17:53
Show Gist options
  • Save emurillo510/c7c47d9d8fa1243b96510f42d2f44b38 to your computer and use it in GitHub Desktop.
Save emurillo510/c7c47d9d8fa1243b96510f42d2f44b38 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
didInsertElement(){
},
actions: {
changeData(){
this.set('data', 'sadfasfdasfa');
}
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
getData(){
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
{{appName}}
{{my-component data=(mut appName)}}
<br>
<br>
{{yield}}
{{data}}
<button {{action 'changeData'}}>change data</button>
{
"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": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment