function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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')}"
                  scripts="{!join(',','/resource/jQuery','/resource/jsVectorMap','/resource/jsVectorMapUS')}" 
                  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}" />