Activity › Forums › Salesforce® Discussions › How can we use a lightning component in a Salesforce VisualForce Page?
Tagged: Apex IncludeLightning, Javascript, Lightning Components, Salesforce Help and Training, Salesforce Visualforce Page
-
How can we use a lightning component in a Salesforce VisualForce Page?
Posted by Aman on September 23, 2018 at 10:44 PMHow can we use a lightning component in a VisaulForce Page? Explain?
Avnish Yadav replied 7 years, 7 months ago 3 Members · 3 Replies -
3 Replies
-
A Lightning component can be embed in any webpage using a very powerful and flexible feature, Lighting out. When used with Visualforce some complexity becomes simpler.
Lightning component can be added to Visualforce page in three steps:1. We have to first Add the Lightning Components for Visualforce JavaScript library to your targetted Visualforce page using the tag.
2. Next we have to create and refer a Lightning app which is used to the component dependencies.
3. Lastly we need to write a JavaScript function which will finally create the the component on the page using $Lightning.createComponent()
- [adinserter block='9']
-
Hello,
There are three steps to add Lightning components to a Visualforce page.
- Add the Lightning Components for Visualforce JavaScript library to your Visualforce page using the <apex:includeLightning/> component.
- Create and reference a Lightning app that declares your component dependencies.
- Write a JavaScript function that creates the component on the page using $Lightning.createComponent().
Thanks.
-
Lightning Components for Visualforce is based on Lightning Out, a powerful and flexible feature that lets you embed Lightning components into almost any web page. When used with Visualforce, some of the details become simpler. For example, you don’t need to deal with authentication, and you don’t need to configure a Connected App.
In other ways using Lightning Components for Visualforce is just like using Lightning Out. Refer to the Lightning Out section of this guide for additional details
Log In to reply.