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

  • How to Declare attributes in lightning component of Salesforce?

    Posted by Aditya on February 3, 2020 at 9:01 am

    How to Declare attributes in lightning component of Salesforce?

    Manish replied 5 years ago 3 Members · 2 Replies
  • 2 Replies
  • 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