Activity Forums Salesforce® Discussions How can we implement a lightning component in a webpage?

  • PRANAV

    Member
    September 1, 2016 at 5:56 am

    Hi Tanu,

    First, You can add Lightning component to Visualforce Page. Then , Assign Visualforce pages to the Force.com Site to make a webpage.

    You only have to use a few lines of Visualforce markup to get up and running with Lightning Components for Visualforce.

    <apex:page>
    <apex:includeLightning />

    <div id="lightning" />

    <script>
    $Lightning.use("c:lcvfTest", function() {
    $Lightning.createComponent("ui:button",
    { label : "Press Me!" },
    "lightning",
    function(cmp) {
    // do some stuff
    });
    });
    </script>
    </apex:page>

    Hope this helps you.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos