Last active
August 10, 2016 14:54
-
-
Save ryanlabouve/21b6eed93d315ea10a46f6948e9d0564 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.Controller.extend({ | |
| log(msg) { | |
| Ember.$('.log').append(msg); | |
| Ember.$('.log').append(Ember.$("<br><br>")); | |
| }, | |
| writeObject(arg) { | |
| let str = ""; | |
| for (let key in arg) { | |
| console.log(key); | |
| str += `${key}: ${arg[key]}`; | |
| } | |
| this.log(str); | |
| }, | |
| actions: { | |
| firstAction() { | |
| this.log(`${[...arguments].length} argument(s)`); | |
| [...arguments].forEach(argument => this.writeObject(argument)); | |
| } | |
| } | |
| }); |
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
| body { | |
| margin: 12px 16px; | |
| font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| font-size: 12pt; | |
| } | |
| label { | |
| display: block; | |
| line-height: 14px; | |
| padding: 0.3rem; | |
| margin-bottom: 0.7em; | |
| } | |
| input { | |
| height: 32px; | |
| width: 100%; | |
| } | |
| .log { | |
| background: #eee; | |
| color: #333; | |
| padding: 2rem; | |
| margin-top: 3rem; | |
| position: relative; | |
| } | |
| .log:before { | |
| position: absolute; | |
| top: 10px; | |
| left: 10px; | |
| font-size: 12px; | |
| font-weight: bold; | |
| content: 'Results'; | |
| } |
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.4", | |
| "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.7.0", | |
| "ember-data": "2.7.0", | |
| "ember-template-compiler": "2.7.0" | |
| }, | |
| "addons": {} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment