Salesforce lightining

Requirement:   Embed Salesforce Lightining component In Visualforce Page.

Lightning Components is a UI framework for developing web apps for mobile and desktop devices. It’s a modern framework for building single-page applications with dynamic, responsive user interfaces for Lightning Platform apps. It uses JavaScript on the client side and Apex on the server side.

 

lightining_Component
Lightining Component

 

Ok’s  Alot of talking now move to the code.

 

Steps to be followed  for Embed Salesforce Lightining component In Visualforce Page are:

1)  create Lightining application

2) Then create a Lightining Component

3) Now embed your lightining component in Visualforce page in which you want to show your lightining component

 

To Embed your lightining component in visualforce page  follow the below code

<apex:page standardController="Services__c" sidebar="false">

    <apex:includeLightning />
      // div in which we embeed our lightining component
    <div id="LcDisplayId" />  
    <script>
    $Lightning.use("c:yourlightiningApplicationname",function() {
        $Lightning.createComponent("c:Yourcomponentname",{
         // here you can pass parameter to your component
            'recordId':'{!Services__c.id}'
           
        },
     "LcDisplayId",
        // call back function
        function(cmp) {
           
          }
       );
    });
    </script>
</apex:page>

 

Hits: 323

Share Post

By Himanshu Rana

My Name is Himanshu Rana, 23 Years young, born and grow up in Ghaziabad, India. A High Spirited Salesforce Admin, Developer and a Blogger. I currently work at Wakencode Technologies,

Leave a Reply

Your email address will not be published. Required fields are marked *