+ Start a Discussion

lightning helper class

Hi All,

I have a simple question. Based on the development documents, helper class of lightning should be described common methods. However, I can't find out the way to use a helper class from other lightning components. Anyone know how we should call a helper class from other lightning components or appropriate structure of lightning component?

Thanks in advance.
Sharankumar DesaiSharankumar Desai
Hi Kiyotaka,

Below is the sample of how Helper Class method can be used from Lightning Component Controller

STEP 1 : Below method is defined in Helper CLass

 method2: function(inputParam1) {       

  //-- Perform your business logic here


STEP 2 : Below Method is defiened in Controller Class which calls Method defined in Helper CLass.

 method1: function(component, event, helper) {
        //-- Call Helper Class Method

Hi Sharankumar,

Thank you for your prompt reply.
I'm actually going to do it. I really appreciate your help.
Sharankumar DesaiSharankumar Desai
You are Welcome ...