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
Chadwick SakonchickChadwick Sakonchick 

How to load static resources in Lightning Components IRL

I've seen the thread in documentation here on loading static resources using ltng:require, but I don't quite get the formatting via the example. I'm looking for some assistance to make sure what i'm doing is correct, because i'm getting an error while attempting to load these resources in the browser.

These are my files in static resources

 - Resource Name: MomentJS | Filename: /moment.min.js
 - Resource Name: FullCalendarCSS | Filename: /fullcalendar.css
 - Resource Name: FullCalendarJS | Filename: /fullcalendar.js
 - Resource Name: jQuery | Filename: /jquery.min.js

This is the code I have to attach these files to my lightning component

fullCalendar.cmp
<aura:component controller="FullCalendarController" implements="force:appHostable">
      <ltng:require styles="{!$Resource.FullCalendarCSS + '/fullcalendar.css'}"
          scripts="{!join(',', 
          $Resource.FullCalendarJS + '/fullcalendar.js', 
          $Resource.jQuery + '/jquery.min.js',
          $Resource.MomentJS + '/moment.min.js')}"
          afterScriptsLoaded="{!c.scriptsLoaded}"/>
      <aura:attribute name="events" type="Events[]" />
      <div id="calendar"></div>
  </aura:component>


 
Chadwick SakonchickChadwick Sakonchick
Seems the file names are not required unless you're uploading everything in a zip file, here is the code:
 
<aura:component controller="FullCalendarController" implements="force:appHostable">
  <ltng:require styles="{!$Resource.FullCalendarCSS}"
    scripts="{!join(',', 
    $Resource.FullCalendarJS, 
    $Resource.jQuery,
    $Resource.MomentJS)}"
    afterScriptsLoaded="{!c.scriptsLoaded}"/>
  <aura:attribute name="events" type="Events[]" />
  <div id="calendar"></div>
</aura:component>

 
sfdcMonkey.comsfdcMonkey.com
can you share the link , where you download all of these js/css resources 
thanks