Last active
June 10, 2016 15:23
-
-
Save piotrpalek/b7509cf50ddb9e33d6fdbdad9bb1d830 to your computer and use it in GitHub Desktop.
hash helper
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({ | |
prettyParams: Ember.computed('params', { | |
get() { | |
return `${this.get('params.paramA')} && ${this.get('params.paramB')}`; | |
} | |
}) | |
}); |
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'; | |
function random() { | |
return Math.round(Math.random() * 100); | |
} | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
paramA: random(), | |
paramB: random(), | |
actions: { | |
randomize() { | |
this.set('paramA', random()); | |
this.set('paramB', random()); | |
} | |
} | |
}); |
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.8.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.5.1", | |
"ember-data": "2.5.2", | |
"ember-template-compiler": "2.5.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment