Skip to content

Instantly share code, notes, and snippets.

@luxzeitlos
Created April 22, 2018 17:11
Show Gist options
  • Save luxzeitlos/aa3ffa41642d3401afe6253353fde5e0 to your computer and use it in GitHub Desktop.
Save luxzeitlos/aa3ffa41642d3401afe6253353fde5e0 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
getValue(){
var a = 7 * 2;
return a;
},
getResult(){
var result = this.getValue(); // result is not function
return `Test ${result}`;
},
actions: {
test() {
alert(this.getResult());
}
}
});
<button onclick={{action 'test'}}>Test</button>
{
"version": "0.13.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.16.2",
"ember-template-compiler": "2.16.2",
"ember-testing": "2.16.2"
},
"addons": {
"ember-data": "2.16.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment