Created
August 8, 2017 19:52
-
-
Save brettburley/5592a6057ad6339767cbba6d28711543 to your computer and use it in GitHub Desktop.
New Twiddle
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({ | |
| actions: { | |
| onchange(value) { | |
| } | |
| } | |
| }); |
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'; | |
| const { later } = Ember.run; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle', | |
| content: [ | |
| { label: 'Option 1', value: '1' }, | |
| { label: 'Option 2', value: '2' }, | |
| { label: 'Option 3', value: '3' } | |
| ], | |
| actions: { | |
| onselect(value) { | |
| this.set('value', value); | |
| later(() => this.set('content', [ | |
| { label: 'Option 1', value: '1' }, | |
| { label: 'Option 2', value: '2' }, | |
| { label: 'Option 3', value: '3' }, | |
| { label: 'Option 4', value: '4' } | |
| ]), 2000); | |
| } | |
| } | |
| }); |
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 eq(params/*, hash*/) { | |
| return params[0] === params[1]; | |
| } | |
| export default Ember.Helper.helper(eq); |
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