三步可以实现在 VF Page 里面引用 Lightning Component:
- Add the <apex:includeLightning /> component to your Visualforce page.
- Reference a Lightning app that declares your component dependencies with
Lightning.use(). - Write a function that creates the component on the Visualforce page with
$Lightning.createComponent().
<apex:page standardController=”Contact”>
<apex:includeLightning />
<div id=”Con” />
<script>
$Lightning.use(“c:myLightningApp”, function() {
$Lightning.createComponent(
“c:FormContact”,
{},
“Con”,
function(cmp) {
console.log(“Component is created!”);
console.log(cmp);
});
});
</script>
</apex:page>
具体引用可以参照这个 Link。
补充在 VF Page 里面去引用 VF Page的方法:
Ex :- <apex:include pagename=”actionstatus”/>.
网友评论