function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VijayNiVijayNi 

How to view Lightning component in salesforce classic

Hi All,

I have a requriement where i need to display my  Lightning component in classic I  have included  Lightning component it in My visualforce page  but i am seeing the below erorr in nloading the Vf page  and output is being displayed as blank.
Vf Page :
<apex:page>
    <apex:includeLightning />
    <script>
        $Lightning.use("c:ExampleApp", function() {
          $Lightning.createComponent("c:ExampleApp",
              { displaytext: "This is your Lightning component"
              },
               function(cmp){
                   console.log('Lightning component is being displayed in a VF page');
              });
        });
    </script>
    <apex:includeLightning />
    <div style="Width:100%;height:150px;" id="lightningcomp" />
</apex:page>




User-added image


Can i include my Lightning component directly in salesforce classic ?
Thanks,
Vijay.
ShivankurShivankur (Salesforce Developers) 
Hi Vijay,

Please check out this blog, which could help you implementing this requirement:
https://developer.salesforce.com/blogs/developer-relations/2016/02/lightning-components-visualforce-lightning.html

Hope above information helps. Please mark as Best Answer so that it can help others in future.

Thanks.