You need to sign in to do that
Don't have an account?
Ankur Srivastava
Conditionally render lightning app/component in VF page.
How can I conditionally render a lightning component/app in my VF page based on a button click ? I have a lightning lookup component which I want to render when I click a search button on my VF page.
Only onclick of button you will call the function that renders your lightning component .The JS code just draws the lightning component to the DOM and its not necessary to call the function on Onload ,instead you can call the function onclick of button
All Answers
Ankur,
You can use the following components on a visualforce page
in conjunction with In page controller you need to set isLightningActivated flag when button clicks, for instance:See more details here: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_outputPanel.htm
Only onclick of button you will call the function that renders your lightning component .The JS code just draws the lightning component to the DOM and its not necessary to call the function on Onload ,instead you can call the function onclick of button