Skip to content

Instantly share code, notes, and snippets.

@raymondjcox
Last active August 24, 2016 14:01
Show Gist options
  • Save raymondjcox/665393be287718d7e040fbaa384f44bf to your computer and use it in GitHub Desktop.
Save raymondjcox/665393be287718d7e040fbaa384f44bf to your computer and use it in GitHub Desktop.
textarea
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
value: '',
maxLength: Ember.computed('value.length', function() {
if (this.get('value.length') > 10) {
return this.get('value.length');
} else {
return 9000;
}
})
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{textarea maxlength=maxLength value=value}}
<br>
<br>
{
"version": "0.10.4",
"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.7.0",
"ember-data": "2.7.0",
"ember-template-compiler": "2.7.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment