Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:application extends="force:slds">
- <aura:attribute name="value" type="Integer" default="{!1+1}" />
- <c:test value="2" /> //changeable
- <c:test value="{!2}" /> //changeable
- <c:test value="{#2}" /> //changeable
- <c:test value="{!1+1}" /> //immutable
- <c:test value="{#1+1}" /> //immutable
- <c:test value="{!v.value}" /> //immutable (same here, should be bound, but not final)
- <c:test value="{#v.value}" /> //changeable
- </aura:application>
- <aura:component >
- <aura:attribute name="value" type="Integer" />
- <lightning:button label="Change Valuze to 10" onclick="{! c.changeValue }" />
- {!v.value}
- </aura:component>
- ({
- changeValue: function(cmp, evt, helper) {
- cmp.set("v.value", 10);
- },
- })
Add Comment
Please, Sign In to add comment