Last active
June 26, 2017 17:56
-
-
Save feanor07/47c0f2499c4035e05b230c88fda2528a to your computer and use it in GitHub Desktop.
so#44759267
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: 'Ember Twiddle', | |
init() { | |
} | |
}); |
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({ | |
queryParams: ['fin', 'ftw', 'additionalParams'], | |
actions: { | |
updateFin() { | |
this.set('fin', `val${Math.random()}`); | |
}, | |
updateFtw() { | |
this.set('ftw', `val${Math.random()}`); | |
}, | |
updateAdditionalParams() { | |
let dynamicProperty = `prop${Math.random()}`; | |
let val1= `val${Math.random()}`; | |
let val2 = Math.random(); | |
let val3 = new Date(); | |
let json = {prop2: val2, prop3: val3}; | |
json[dynamicProperty] = val1; | |
this.set('additionalParams', JSON.stringify(json)); | |
}, | |
clearAll() { | |
this.set('fin', undefined); | |
this.set('ftw', undefined); | |
this.set('additionalParams', undefined); | |
}, | |
clearFin() { | |
this.set('fin', undefined); | |
}, | |
clearFtw() { | |
this.set('ftw', undefined); | |
}, | |
clearAdditionalParams() { | |
this.set('additionalParams', undefined); | |
} | |
} | |
}); |
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