Activity Forums Salesforce® Discussions How to Declare attributes in lightning component of Salesforce?

  • Sumit kumar

    Member
    February 3, 2020 at 9:09 AM

    Below is the syntax of using attribute in lightning component or application –

    <aura:component>
    
    <aura:attribute name="yourName" type="String" default="Marc Benioff" description="Using for Store Name"/>
    
    </aura:component>

     

  • [adinserter block='9']
  • Manish

    Member
    February 3, 2020 at 9:22 AM

    Hi Aditya,

    you can find here,

     

    <aura:attribute name=”accObj” type=”Account” access=”public” default=”{‘sobjectType’: ‘Account’, ‘Name’: ”, ‘Website’: ”, ‘Phone’: ”, ‘Description’: ”, ‘Industry’: ”}” />

Log In to reply.