Skip to content

Instantly share code, notes, and snippets.

@HenryVonfire
Created November 10, 2016 13:48
Show Gist options
  • Save HenryVonfire/ca91e4c83c03c56389e118eee00fbc25 to your computer and use it in GitHub Desktop.
Save HenryVonfire/ca91e4c83c03c56389e118eee00fbc25 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions:{
action1(){ console.log('action1'); },
action2(){ console.log('action2'); }
}
});
<h1>Welcome to {{appName}}</h1>
<br>
{{com-one actionGroup=(hash
action1=(action "action1")
action2=(action "action2"))}}
{{com-two actionGroup=actionGroup}}
<button {{action actionGroup.action1}}>button1</button>
<button {{action actionGroup.action2}}>button2</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