Lightning Component Attributes
lightning Component 中attribute使用。attribute组件中的type 可以为自定义对象,标准对象,List,String,Integer等
<aura:component implements="force:appHostable" description="HelloLightning"> <aura:attribute name="FirstName" type="String" default="潇洒写一回" /> <aura:attribute name="Age" type="Integer" default="18"/> <aura:attribute name="isMale" type="Boolean" default="true"/> <p>博主 is {!v.FirstName}</p> <p>{!v.FirstName} is {!v.Age} Years Old.</p> <p>{!v.FirstName} is male = {!v.isMale}</p> </aura:component>