Sep 26, 2024
163 Views
Comments Off on Create Lightning Components in the Developer Console
0 0

Create Lightning Components in the Developer Console

Written by

The Developer Console lets you create and edit Lightning components, with access to other powerful Force.com development tools.

Follow these steps to create a Lightning component in the Developer Console. You’ll also create a Lightning app as a container for the component.

  1. Open the Developer Console by clicking Your Name | Developer Console.The Developer Console opens in a new window.
  2. Click File | New | Lightning Component.
  3. Enter firstComponent for the name of the new component, and click OK.This creates a firstComponent.cmp resource.
  4. In the editor, enter the following markup for the component.

 

My First Lightning Component!

 

5. Click File | Save. 6. Create a Lightning app. Click File | New | Lightning Application. 7. Enter helloWorldApp for the name of the new app, and click OK. 8. This creates a helloWorldApp.app resource. 9. In the editor, enter the following markup for the app, which embeds the component you created in a Lightning app.

 

 

c:helloWorld refers to the component helloWorld.cmp using the default namespace c. If your organization has a registered namespace, you can use it to reference Lightning components, such asmyNamespace:helloWorld.

9. To see your app, click Preview.

The app opens in a new window.

A .app resource can’t be included in Salesforce1 but a .cmp resource can. You can embed your components in a .app resource to preview it as a standalone app outside of Salesforce1.

To see a list of existing Lightning resources, click File | Open Lightning Resources.

Article Categories:
Salesforce
Ramya Singh
https://thestarbiznews.com

Ramya Singh isn't your average tech blogger. Sure, she's got the brains to understand the latest algorithms and the jargon to explain them in plain English. But she's also got a twinkle in her eye and a way of weaving technology into the fabric of everyday life that makes it nothing short of fascinating. Whether she's reviewing the latest smartphone, exploring the potential of virtual reality, or delving into the ethical implications of artificial intelligence, Ramya does it with a contagious enthusiasm that makes you want to learn more, do more, and be a part of the exciting world of tech. So, if you're looking for a tech blog that's informative, inspiring, and just plain fun, follow Ramya Singh. She'll take you on a journey through the ever-evolving landscape of technology, and you might just find yourself a little bit more tech-savvy (and a lot more excited) along the way.