You need to sign in to do that
Don't have an account?
Michael_Mantouvalos
How to call a function with parameters from another function in aura jsController of a components
Hello everybody!
I have a component that has a jsController. Inside the controller there my "doInit" function.
I also have created another function with 4 parameters
printFunction : function ( param1, patam2, param3, param4){
.......
}
Is there a way to call printFunction having also defined the parameters, from inside "doInit" function?
Thanks in advance!
Lightning - JS controller invoking its own method
Call another method from a method in the same Lightning controller
Let me know if this helps, if it does, please close the query by marking it as solved. It may help others in the community. Thank You!
method2 : function (name, lastname ,age, height){
}
I think i found the solution to one of the links you send though...
You cannot create a custom parameter function i Js Controller, ONLY in helper. So in my situation i did something like :
JsController :
({
doInit : function(component, event, helper){
var name = 'alex';
var lastname ='johnson';
var age = 30;
var height = 190;
helper.method2(component, event, name, lastname, age, height);
},
})
helper:
({
method2 : function (component, event, name , lastname, age, height){
.............
}
})
And it worked. Thank you for information
Have a good one!