How can i call JS(client side controller) function into helper js function. Please show me the code. Thankyou
2 Answers
Danryl,
A Sample Code below.
<aura:component >
<ui:outputText aura:Id="Hello" value=""/>
<ui:button label="Click" press="{!c.Click}"/>
</aura:component>
//Controller
({
Click : function(component, event, helper)
{
helper.helperMethod(component,event,sum);
}
})
//Helper
({
helperMethod : function(component,sum)
{
var hello=component.find("Hello");
hello.set("v.value","New Value !!!")
}
})
As ankuli suggested, refer the trailhead document.
-
Please check if you have idea about this. salesforce.stackexchange.com/questions/88770/… Commented Aug 20, 2015 at 6:59
-
Hope you can help me in this problem salesforce.stackexchange.com/questions/89252/… Commented Aug 25, 2015 at 5:17
you can call helper js method from client side controller but reverse is not defined anywhere.
helper.callMethodOfClinetSideCotnroller(component, parameter1);
-
Where can we Study this one.. will you give me a tutorial link for that so that i can deeply understand and study how to use helper . Thank you I really appreciate your will to help. Commented Aug 14, 2015 at 7:24
-
You can use Trail head which will give you knowledge very quickly. and if you want go through deep into lightning. this link is useful resources.docs.salesforce.com/sfdc/pdf/lightning.pdf– AnkuliCommented Aug 14, 2015 at 7:41
-
Will you give me an example of code that will use a helper, JS( client side controller),apex(server side controller) , and aura componet. Please .. Commented Aug 14, 2015 at 8:04