In this article, we will learn how to create a first lightning component with all the basic component description.
Prerequisite: –
As most of you know that lightning is future of salesforce and sometimes we need the customized solution in order to achieve our business requirement. Lightning Component basically runs on Aura framework. So, Follow the below steps to create your own lightning component.
Step 1- Click on your name and then Open Developer Console into New Window
Step 2 – Click on File -> New -> Lightning Component -> Name it FirstComponent and Click Submit. It will open a development workspace where we can develop/put HTML or predefined aura tags.
Step 3 – Files that each component includes
Step 4 – Write Static text into your Component. Put “This is My First Lightning Component” between <aura:component> opening and closing tags.
Step 5 – Test your component, to test we will create a Lightning App. File -> New -> Lightning Application -> Name it FirstComponentApp -> Submit. Incorporate you component into app and Click preview to see the output. Put <c:FirstComponent></c:FirstComponent> between <aura:application> openting tags, save and Click Preview.
Woohoo, you have just created your first lightning component. In next blog, we will learn how to use variables in lightning component and dynamic variable bindings.
Sharing is Caring 🙂
Please do not forget to like our facebook page and subscribe to get the latest news about lightning and classic tutorial 🙂