Skip to content

Instantly share code, notes, and snippets.

@baileyparker
Created July 20, 2017 00:28
Show Gist options
  • Save baileyparker/fb106e7b81e7def83611552534d338c8 to your computer and use it in GitHub Desktop.
Save baileyparker/fb106e7b81e7def83611552534d338c8 to your computer and use it in GitHub Desktop.
Textarea Scroll
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
scroll: function(e) {
this.set('text', this.get('text') + ' scroll!');
},
scroll: function(e) {
this.set('text2', this.get('text2') + ' scroll!');
},
},
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
{{textarea onscroll=(action 'scroll')}}
<p>Scroll?: {{text}}</p>
<br><br>
<textarea onscroll={{action 'scroll'}}></textarea>
<p>Scroll?: {{text2}}</p>
{
"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