Skip to content

Instantly share code, notes, and snippets.

@simpluslabs simpluslabs/compAttributes

Last active Nov 19, 2018
Embed
What would you like to do?
<aura:component ><!--myComponent1-->
<aura:handler name="init" value="{! this}" action="{! c.doInit}" />
<!--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'}"/>
<a><b>My component</b></a>
<h1>This is a test component</h1>
<p>Your component code goes here.</p>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.