Skip to content

Instantly share code, notes, and snippets.

@praxxis
Last active June 20, 2016 14:19
Show Gist options
  • Save praxxis/2b17ade79d92db336dd5c7acb6efc063 to your computer and use it in GitHub Desktop.
Save praxxis/2b17ade79d92db336dd5c7acb6efc063 to your computer and use it in GitHub Desktop.
onclick
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
alert1() {
alert('yes 1');
},
alert2() {
alert('yes 2');
},
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
<button onclick={{action 'alert1'}}>onclick</button>
<button {{action 'alert2'}}>action</button>
<br>
<br>
{
"version": "0.9.3",
"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"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment