Skip to content

Instantly share code, notes, and snippets.

@eddie-ruva
Created September 15, 2016 03:57
Show Gist options
  • Save eddie-ruva/4f5e10e7c2541052790af69e93fa02bb to your computer and use it in GitHub Desktop.
Save eddie-ruva/4f5e10e7c2541052790af69e93fa02bb to your computer and use it in GitHub Desktop.
On Change textarea
import Ember from 'ember';
export default Ember.Controller.extend({
changesCount: 0,
actions: {
onChange() {
this.set('changesCount', this.changesCount + 1);
}
}
});
Changes saved: {{changesCount}}
<br/>
<br/>
{{textarea change=(action 'onChange')}}
{
"version": "0.10.5",
"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.8.0",
"ember-data": "2.8.0",
"ember-template-compiler": "2.8.0",
"ember-testing": "2.8.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment