Categories
Appunti

Attribute Type Salesforce Aura Component

<!--Basic types-->
    <aura:attribute name="ItemName" type="String" default="Bag"/>
    <aura:attribute name="SerialNumber" type="Long" default="1"/>
    <aura:attribute name="Quantity" type="Integer" default="2"/>
    <aura:attribute name="Price" type="Decimal" default="blue"/>
    <aura:attribute name="PurchaseDate" type="Date" default="2018-11-9"/>
    <aura:attribute name="Dispatched" type="Boolean" default="true"/>
    <aura:attribute name="Color" type="String" default="blue"/>
    
    <!--Collection types-->
    <aura:attribute name="ColorArray" type="String[]" default="['red', 'green', 'blue']"/>
    <aura:attribute name="ColorList" type="List" default="['red', 'green', 'blue']"/>
    <aura:attribute name="ColorMap" type="Map" default="{a: 'red', b: 'green', c: 'blue'}"/>
    <aura:attribute name="ColorSet" type="Set" default="['red', 'green', 'blue','red']"/>
    
    <!--Object types-->
    <aura:attribute name="PersonObject" type="Object" default="{'name': 'John', 'age': '25'}"/>

Docs

Setting Attributes

Leave a Reply