• #31926
     Prachi #9

    Can we include external Library into Salesforce Lightning Component?

    Can we include external Library into Salesforce Lightning Component?


     Anjali #10

    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).

    Salesforce | Parul Parul #2

    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.

    Salesforce | Parul Parul #2

    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.


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


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 2019 Forcetalks. All Right Reserved.

Log in with your credentials


Forgot your details?