Activity Forums Salesforce® Discussions What are the different ways to conditionally display markup in Salesforce?

  • shariq

    Member
    September 23, 2018 at 11:14 pm

    Using the <aura:if> tag
    Use CSS to toggle visibility of markup by calling $A.util.toggleClass(cmp, ‘class’) in JavaScript code

  • Parul

    Member
    September 23, 2018 at 11:46 pm

    There are different ways to conditionally display markup, and what is the preferred approach;

    use the <aura:if> tag

  • Avnish Yadav

    Member
    September 25, 2018 at 6:27 am

    Hello,

    Using the <aura:if> tag is the preferred approach to conditionally display markup but there are alternatives. Consider the performance cost and code maintainability when you design components. The best design choice depends on your use case.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos