I could not show the lightning app
in a visual force page.
However, if I include weiParent2
component in the community lightning builder the component will show up.
What's the issue to use the lightning in a VF page?
Lightning Login App
<aura:application extends="ltng:outApp"
implements="forceCommunity:availableForAllPageTypes"
access="GLOBAL"
>
<aura:dependency resource="c:weiParent2"/>
<c:weiParent2 />
</aura:application>
VF page
<html>
<head>
<apex:includeLightning/>
</head>
<body>
<h1>
Hello World Wei
</h1>
<div id="lightning"/>
<script>
$Lightning.use("c:lightningLoginApp", function () {
$Lightning.createComponent("c:weiParent2",
{label: "This is the lightning button!"},
"lightning",
function (cmp) {
debugger
});
});
</script>
</body>
</html>
<apex:page>
tag.