LoginSignup
2
1

More than 5 years have passed since last update.

Trailhead 属性と式 Attributes and Expressions

Posted at
campingListItem.cmp
<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" required="true"/>
    <p>Name: <ui:outputText value="{!v.item.Name}"/></p>
    <p>Price: <lightning:formattedNumber value="{!v.item.Price__c}" style="currency"/></p>
    <p>Quantity: <lightning:formattedNumber value="{!v.item.Quantity__c}"/></p>
    <p>Packed:  <lightning:input checked="{!v.item.Packed__c}" type="toggle"/></p>
</aura:component>

「Name:」とかはなくても通る。
「v.」を使えばいいこと、Quantityには要らないStyleがPriceには必要だったこと(通貨だから当たり前なんだけど)を自力で考えなければならない。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1