Activity Forums Salesforce® Discussions How can we conditionally display content in lightning component?

  • How can we conditionally display content in lightning component?

    Posted by Pooja on July 20, 2020 at 5:17 PM

    How can we conditionally display content in lightning component in Salesforce?

    Mallika replied 6 years, 1 month ago 2 Members · 1 Reply
  • 1 Reply
  • Mallika

    Member
    July 21, 2020 at 6:03 AM

    Hi Pooja,
    By using <aura:if> we can display content conditionally.
    simple example that shows an error message when an error occurs.

    <aura:if isTrue="{!v.isError}">
        <div>{!v.errorMessage}</div>
    </aura:if>

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos