+ Start a Discussion
Michael PlunkettMichael Plunkett 

Issue loading multiple scripts with ltng:require

I am using ltng:require as specified in the docs to load multiple js libraries -- in the correct order of dependency. However, the scripts only load about 50% of the time. The other 50% the jsVectorMap scripts never load and the afterScriptsLoaded function never fires. Any thoughts??
<ltng:require styles="{!join(',','/resource/slds_2_1_3','/resource/jsVectorMapCSS')}"
                  afterScriptsLoaded="{!c.setScriptLoaded}" />

Marc-Andre RoussilMarc-Andre Roussil
I'm facing the same problem here, how did you solve your issue ?
Michael PlunkettMichael Plunkett
I haven't... :(
Taresh KhandekarTaresh Khandekar
You have to specify the "$Resource" before rest of the directory check below

<ltng:require scripts="{!join(',', $Resource.Jquery, $Resource.bootstrap + '/BootstrapJs.min.js'}" styles="{!$Resource.bootstrap + '/BootstrapCss.min.css'}" afterScriptsLoaded="{!c.doInit}" />