Skip to content

Instantly share code, notes, and snippets.

@willrax
Last active March 16, 2018 14:44
Show Gist options
  • Save willrax/bb830e988fc546a07ae263659d629816 to your computer and use it in GitHub Desktop.
Save willrax/bb830e988fc546a07ae263659d629816 to your computer and use it in GitHub Desktop.
valid input
import Ember from 'ember';
const { computed } = Ember;
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
value: 'test',
inputIsValid: computed('value', function() {
return this.get('value').includes('will');
})
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
<input value={{value}} oninput={{action (mut value) value="target.value"}} >
{{inputIsValid}}
<br>
<br>
{
"version": "0.13.0",
"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.16.2",
"ember-template-compiler": "2.16.2",
"ember-testing": "2.16.2"
},
"addons": {
"ember-data": "2.16.3",
"ember-concurrency": "0.8.16"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment