• #31926
     Prachi #9
    Forcetalks

    Can we include external Library into Salesforce Lightning Component?

    Can we include external Library into Salesforce Lightning Component?

     

    #31958
     Anjali #8
    Forcetalks

    Hi Prachi,

    Yes ,we can use multiple libraries in our lightning component like JQuery, Bootstrap, custom CSS and custom Javascript libraries from a local resource (static resource).

    #39524
    Salesforce | Parul Parul #2
    Forcetalks

    To reference a JavaScript library that you’ve uploaded as a static resource, use a <ltng:require> tag in your .cmp or .app markup.
    The framework’s content security policy mandates that external JavaScript libraries must be uploaded to Salesforce static resources. For more information on static resources, see “Static Resources” in the Salesforce online help.

    #39526
    Salesforce | Parul Parul #2
    Forcetalks

    Adding more points:

    Here’s an example of using <ltng:require>.
    <ltng:require scripts=”{!$Resource.resourceName}”
    afterScriptsLoaded=”{!c.afterScriptsLoaded}” />

Viewing 4 posts - 1 through 4 (of 4 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?