Forked from jenweber/components.my-component.js
Last active
September 25, 2019 17:07
-
-
Save joshuaogle/d2107a68cb41c9d0075dc63736ed2ec8 to your computer and use it in GitHub Desktop.
Simple Select
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({ | |
| selectedOption: null, | |
| actions: { | |
| setSelection: function(selected) { | |
| this.set('selectedOption', selected) | |
| console.log(this.get('selectedOption')) | |
| }, | |
| submit: function(){ | |
| // save or sendAction | |
| console.log(this.get('selectedOption')) | |
| } | |
| } | |
| }); |
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({ | |
| appName: 'Structure - Tree View', | |
| treeViewData: { | |
| simple: { | |
| 1: { | |
| path: "/namespaceA", | |
| label: "namespaceA", | |
| type: "namespace", | |
| children: { | |
| 1: { | |
| path: "/namespaceA/ns1", | |
| label: "ns1", | |
| type: "namespace" | |
| }, | |
| 2: { | |
| path: "/namespaceA/ns2", | |
| label: "ns2", | |
| type: "namespace" | |
| }, | |
| } | |
| }, | |
| 2: { | |
| path: "/namespaceB", | |
| label: "namespaceB", | |
| type: "namespace" | |
| } | |
| }, | |
| average: { | |
| }, | |
| complex: { | |
| }, | |
| deep: { | |
| } | |
| } | |
| }); |
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.10.6", | |
| "EmberENV": { | |
| "FEATURES": {} | |
| }, | |
| "options": { | |
| "use_pods": false, | |
| "enable-testing": false | |
| }, | |
| "dependencies": { | |
| "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
| "ember": "3.4.3", | |
| "ember-data": "3.4.2", | |
| "ember-template-compiler": "3.4.3", | |
| "ember-testing": "3.4.3" | |
| }, | |
| "addons": {} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment