Create a Lightning Component Bundle in the Force.com IDE

A Lightning component is a combination of markup, JavaScript, and CSS. Create a Lightning component bundle that contains these files.
  1. In the Force.com IDE, select File | New | Lightning Bundle.
  2. Enter MyContactList in the Name field, and then click Finish.
    Create New Lightning Component window
  3. In the Package Explorer, expand the src, aura, and MyContactList directories.
  4. Double-click MyContactList.cmp.
  5. Note the Markup, Controller, Helper, Renderer, and CSS tabs at the bottom of your source panel. When you created the MyContactList component bundle, the bundle’s controller, helper, renderer, and CSS files were created for you. You can easily navigate among the items in your component bundle using these tabs.
    Source panel with callout on tabs at bottom

    If you don’t need all these files, you can delete them when you’re ready to deploy your component. To delete a file, right-click the file in the Package Explorer and then choose Delete.

    Note

  6. Replace the MyContactList.cmp line that contains <aura:component> with the following line.
  7. To save your updated component, press Ctrl+S or (Cmd+S on macOS).
  8. Click the Controller tab.
  9. In the body of the myAction JavaScript function, add this code.
  10. To save your updated controller, press Ctrl+S or (Cmd+S on macOS).

Your component can now access data from the MyContactListController Apex controller.