Created
August 23, 2017 05:22
-
-
Save 3gwebtrain/fa2453422b442b407b130e74f690b86f to your computer and use it in GitHub Desktop.
Text Input Binding
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.Controller.extend({ | |
prop2: 'test', | |
prop3: true, | |
appName: 'Ember Twiddle', | |
name:"scb", | |
actions: { | |
enter(val){ | |
console.log(this.get('prop1')); | |
console.log(this.getProperties('prop1','prop2').prop1); | |
console.log(val); | |
this.toggleProperty('prop3'); | |
}, | |
pressed(){ | |
console.log('pressed'); | |
} | |
} | |
}); |
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 function myHelper(params/*, hash*/) { | |
return params; | |
} | |
export default Ember.Helper.helper(myHelper); |
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 function upperCase(params/*, hash*/) { | |
return params[0].toUpperCase(); | |
} | |
export default Ember.Helper.helper(upperCase); |
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.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