Skip to content

Instantly share code, notes, and snippets.

@EWhite613
Created March 8, 2018 16:45
Show Gist options
  • Save EWhite613/6f6dcf8f844c01a0029f738cc585f020 to your computer and use it in GitHub Desktop.
Save EWhite613/6f6dcf8f844c01a0029f738cc585f020 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
clicked () {
this.fooAction('foo')
}
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
crap (a) {this.set('appName', a)},
actions: {
blah (a) {
this.crap(a)
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
{{my-component fooAction=(action 'blah')}}
<br>
<br>
<button {{action "clicked"}}>foo</button>
{
"version": "0.13.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.16.2",
"ember-template-compiler": "2.16.2",
"ember-testing": "2.16.2"
},
"addons": {
"ember-data": "2.16.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment