You need to sign in to do that
Don't have an account?
3421
Lightning component loading doesn't stop
Hi,
I have a lightning component which invokes from a visualforce page, which inturn gets triggered on click of a button. Now, the issue is I see that the loading screen doesnt stop but does invoke the component too
Here is the code
I have a lightning component which invokes from a visualforce page, which inturn gets triggered on click of a button. Now, the issue is I see that the loading screen doesnt stop but does invoke the component too
Here is the code
<apex:page standardController="Order__c" standardStylesheets="false" sidebar="false"> <apex:includeLightning /> <link rel="stylesheet" media="screen" href="{!URLFOR($Resource.Framework__SDLS_Base,'css/styles.css')}"/> <div id="lightning" /> <div class="slds slds-loading-layout" id="mainWrapper1"> <div class="slds-grid slds-loading-layout slds-theme--shade"> <div class="slds-col slds-text-align--center slds-align-middle" > <img src="{!URLFOR($Resource.Framework__SLDS_Base,'/img/spinners/slds_spinner_brand.gif')}" alt="saving" width="50" height="50" /> <span class="slds-text-heading--medium">Loading...</span> </div> </div> </div> <!-- <apex:slds /> --> <script> function componentLoaded() { document.getElementById('mainWrapper12').classList.add('hidden'); } $Lightning.use("c:OrderApp", function() { $Lightning.createComponent("c:Order", { "recordId" : "{!$CurrentPage.parameters.Id}", }, "lightning", function(cmp) { console.log('Component created, do something cool here'); $A.eventService.addHandler({ "event": "ComponentLoadedEvent", "handler" : componentLoaded}); }); }); </script> </apex:page>On click of button, the VF page is called and the loading screen shows up for a fraction of sec, then the lightning component fields show up and the loading moves to the bottom. How do I make sure that the loading stops before component starts?
If you get solution marked it as best answer to help others easily find their solution.
When I add that line, I see that I only have the loading screen going on does not show the component fields. The loader never stops
Thanks,
Harisha