How to use JAVASCRIPT file stored in Static Resources in custom Lightning component?

Sample Code:

<aura:component implements="flexipage:availableForAllPageTypes" access="global"> 
<ltng:require scripts="{!$Resource.myJavaScriptLib}"/> 
<div class="main-content"> 
<aura:outputText value="Hello World!">
</div> 

</aura:component>

Cheers!!!

No comments:

Post a Comment