How can i call JS(client side controller) function into helper js function. Please show me the code. Thankyou
Asked
Active
Viewed 2,533 times
2 Answers
3
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.
Anitha J J
- 356
- 3
- 13
0
you can call helper js method from client side controller but reverse is not defined anywhere.
helper.callMethodOfClinetSideCotnroller(component, parameter1);
Ankuli
- 670
- 2
- 11
- 27
-
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. – Danryl Tigol Carpio Aug 14 '15 at 07: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 https://resources.docs.salesforce.com/sfdc/pdf/lightning.pdf – Ankuli Aug 14 '15 at 07: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 .. – Danryl Tigol Carpio Aug 14 '15 at 08:04
http://salesforce.stackexchange.com/questions/88770/putting-a-field-values-of-an-object-using-apex
– Danryl Tigol Carpio Aug 20 '15 at 06:59