Select your Language

Add lightning Spinner on any lightning component

 Lighting Component


 <aura:attribute name="showSpinner" type="boolean" default="false"/>

 <aura:if isTrue="{!v.showSpinner}">

            <lightning:spinner alternativeText="Searching..." variant="brand" />

        </aura:if>

==============================================

Lightning Component Controller:

FunctionName: function(component, event, helper)

{

// for shing spinner

 component.set('v.showSpinner',true);

// for hiding spinner

 component.set('v.showSpinner',false);

}



No comments:

Post a Comment