• #14757
    Salesforce | Tanu Tanu #121
    Forcetalks

    How to create reusable methods in Lightning JS client side controller for reuse within the client side controller itself?

    How to create reusable methods in Lightning JS client side controller for reuse within the client side controller itself?

    Tagged: , ,

    #14784
    Salesforce | Himanshu Himanshu #125
    Forcetalks

    Hi Tanu,

    All the reusable code in the helper section in lightning –  “helper.functionname(component,event)“. In case, if the helper method themselves need to call other methods, then you can call the same by using the “this” keyword.

    #25627
    Forcetalks

    I agree with Himanshu. If you write the code in the helper.js then this code will be accessible from the controller.js, renderer.js and helper.js itself. It will improve your code reusability.

     

     

Viewing 3 posts - 1 through 3 (of 3 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2018 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?