I want to insert a lightning component to a visualforce page after a button click is done in the visualforce page. So I want to do some vf-controller functions and then open a lightning component in the apex controller of the vf page.
0
votes
1 Answers
0
votes
After button click use at function but you need to create one app for it
<div id="lightning" />
<script>
$Lightning.use("c:Test", function() {
$Lightning.createComponent("c:testCMP",
"lightning",
function(cmp) {
// do some stuff
});
});
</script>
You need to create one lighting app and add dependency in it
c:Test is App and c:testCMP is component