here is my code I have to call another method inside the Ember controller I was tried but this is not working I have confused in this...
please help me to what is wrong in this code?
export default Ember.Controller.extend({
....
getValue(){
var a = 7 * 2;
return a;
},
getResult(){
var result = this.getValue(); // result is this.getValue is not function
}
});
First this code does not makes sense:
here you're using
abefore you declare it.but to answer your question: your code is correct.
Here is a working example. I've just replaced
var a = a * 2;byvar a = 7 * 2;to make this code valid.