Activity Forums Salesforce® Discussions Can we include external JavaScript/CSS libraries in Salesforce Components?

  • shariq

    Member
    September 23, 2018 at 11:00 pm

    It is possible to use custom CSS and JAvascriipt in the Lightning component

  • Parul

    Member
    September 24, 2018 at 12:16 am

    <ltng:require styles="/resource/firstcss[,/resource/secondcss]"
    scripts='/resource/javascript1.js,[/resource/javascript2.js]' afterScriptsLoaded="
    {!c.firstLoadFunction}" />

    Explanation of above example:
    1. style – access multiple CSS files with comma separated. Load files from left to right.
    2. script – access multiple javascript files with comma separated. Load files from left to right.
    3. afterScriptsLoaded – to provide javascript function to notify when all javascript files are loaded.

Log In to reply.

Popular Salesforce Blogs

Salesforce Marketing Cloud Integration with Google Analytics 360

Redefining the future of Marketing – Salesforce Marketing Cloud Integration with Google Analytics 360

Blog in

Know your customers better and make smarter, insight-based marketing decisions through Salesforce’s massive customer relationship management platform twinned with Google Analytics 360’s market-leading digital analytics solution…

Popular Salesforce Videos