Activity Forums Salesforce® Discussions What is the use of <aura:set attribute="else"> in Salesforce lightning component?

  • Piyush

    Member
    November 20, 2019 at 10:33 am

    Hi,

    aura:if evaluates the isTrue expression on the server and instantiates components in either its body or else attribute. Only one branch is created and rendered. Switching condition unrenders and destroys the current branch and generates the other

    <aura:component>
        <aura:if isTrue="{!v.truthy}">
        True
        <aura:set attribute="else">
          False
        </aura:set>
      </aura:if> 
    </aura:component>

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos