-
-
Save Emerson/fa925580c06f6327e350 to your computer and use it in GitHub Desktop.
One Way Input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'input', | |
type: 'text', | |
attributeBindings: ['value'], | |
input(e) { | |
let val = this.readDOMAttr('value'); | |
/* | |
* this.attrs.update(val) | |
* | |
* OR... | |
* | |
* this.attrs.value.update(val) | |
*/ | |
this.attrs.value.update(val); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.4.8", | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.2.0", | |
"ember-template-compiler": "2.2.0", | |
"ember-data": "2.2.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment