Skip to content

Instantly share code, notes, and snippets.

@luxzeitlos
Created July 20, 2016 09:52
Show Gist options
  • Save luxzeitlos/f086a702f73cc8895d918d59cae30923 to your computer and use it in GitHub Desktop.
Save luxzeitlos/f086a702f73cc8895d918d59cae30923 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
insert() {
this.$('.target')
.append('<a id="idnum">Get Data</a>');
this.$('#idnum').on('click', () => {
alert('clicked');
});
}
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<button {{action 'insert'}}>insert</button>
<div class="target"></div>
{
"version": "0.10.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.6.0",
"ember-data": "2.6.1",
"ember-template-compiler": "2.6.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment