Skip to content

Instantly share code, notes, and snippets.

@n1ru4l
Created June 23, 2017 11:22
Show Gist options
  • Save n1ru4l/2560cfe3c47bb82b66806d187c5b8545 to your computer and use it in GitHub Desktop.
Save n1ru4l/2560cfe3c47bb82b66806d187c5b8545 to your computer and use it in GitHub Desktop.
sample
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
foo() {
alert('red box')
},
bar(ev) {
ev.stopPropagation()
alert('green box')
}
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<br>
<br>
<div style="padding:40px;background-color:red" onclick={{action "foo"}}>
<div style="padding:40px; background-color: green" onclick={{action "bar"}}>:trollface:</div>
</div>
{
"version": "0.12.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.12.0",
"ember-template-compiler": "2.12.0",
"ember-testing": "2.12.0"
},
"addons": {
"ember-data": "2.12.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment