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

  • Sumit

    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>

     

  • 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.

Popular Salesforce Blogs

Popular Salesforce Videos