Share Your Experience With Others

Using Lightning Components inside a VisualForce Page

Hello Salesforce Developers, sometimes we need to use the lightning component inside the vf page.Today we will learn how we can
include the lightning component inside a visualforce page.

Step 1: create a lightning component which you want to use inside a visualforce page.

Step 2:create a lightning application and include the lightning component inside the app like this

lightning ap
Step 3: Include <apex:includeLightning /> tag inside the visualforce page

Step 4: Add the below code after the <apex:includeLightning /> it is not mandatory to include after this tag

vf page

Step 5: Run your visualforce page

Lightning App:lcvfTest

lightning ap

Lightning Component:testcomponent2

light compo
Visualforce page:componentinvfpage

vf page 2.PNG

 

Leave a comment