Activity Forums Salesforce® Discussions Can we use lightning component in Visualforce page?

  • Can we use lightning component in Visualforce page?

    Posted by Marziya on November 9, 2020 at 11:53 am

    Can we use lightning component in Visualforce page?

    Shweta replied 4 years ago 3 Members · 2 Replies
  • 2 Replies
  • Anjali

    Member
    November 9, 2020 at 3:13 pm

    We can not display lightning components directly to visualforce page, We have need to create a Lightning Application first with 'ltng:outApp' Interface and make it GLOBAL* accessible . The app uses the <aura:dependency> tag to indicate that it uses the Custom Lightning component.

  • Shweta

    Member
    November 10, 2020 at 4:28 am

    Follow these steps to add lightning components to a Visualforce page:
    1. Add the Lightning Components for Visualforce JavaScript library to your Visualforce page using the <apex:includeLightning/> component.
    2. Create and reference a Lightning app that declares your component dependencies.
    3. Write a JavaScript function that creates the component on the page using $Lightning.createComponent().

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos