Skip to content

Instantly share code, notes, and snippets.

Last active April 12, 2020 07:52
What would you like to do?
<apex:page showHeader="false" sidebar="false">
<apex:includeLightning />
<div id="LightningCompDisplayId"></div>
//please note that you need to create a lightning application and need to put the main component uder this app.
/* <aura:application access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess">
<aura:dependency resource="c:News"/>
<c:News />
//This Lightning app 'NewsApp' will be used here.
$Lightning.use("c:NewsApp", function() {
/* 'News' is Lightning Component Name which we are Displaying In Vf Page
* syntax for create lightning component dynamically :
* $Lightning.createComponent(String type, Object attributes, String locator, function callback) */
function(component) {
// create component Callback, Lightning Component has been Created,
// Now you can set more lightning Component attributes here,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment