Skip to main content
added 1 character in body
Source Link
Mohith Shrivastava
  • 92k
  • 19
  • 161
  • 214

The updated code is as below

<aura:component >

<aura:attribute name="Result" type="Integer" />
<ui:inputNumber aura:id="inputOne" label="Enter first number" />
 <ui:inputNumber aura:id="inputTwo" label="Enter second number" />
 <ui:inputNumber aura:id="inputThree" label="Enter third number" />
 <ui:button aura:id="calculateButton" label="Calculate" press="{!c.calculate}"    />

<div>
Output: <ui:outputNumber aura:id="totalValue" value="{!cv.Result}" />
</div>

"c" is reserved for actions and v is reserved for attributes or values

"c" is reserved for actions and v is reserved for attributes or values

</aura:component>

The updated code is as below

<aura:component >

<aura:attribute name="Result" type="Integer" />
<ui:inputNumber aura:id="inputOne" label="Enter first number" />
 <ui:inputNumber aura:id="inputTwo" label="Enter second number" />
 <ui:inputNumber aura:id="inputThree" label="Enter third number" />
 <ui:button aura:id="calculateButton" label="Calculate" press="{!c.calculate}"    />

<div>
Output: <ui:outputNumber aura:id="totalValue" value="{!c.Result}" />
</div>

"c" is reserved for actions and v is reserved for attributes or values

</aura:component>

The updated code is as below

<aura:component >

<aura:attribute name="Result" type="Integer" />
<ui:inputNumber aura:id="inputOne" label="Enter first number" />
 <ui:inputNumber aura:id="inputTwo" label="Enter second number" />
 <ui:inputNumber aura:id="inputThree" label="Enter third number" />
 <ui:button aura:id="calculateButton" label="Calculate" press="{!c.calculate}"    />

<div>
Output: <ui:outputNumber aura:id="totalValue" value="{!v.Result}" />
</div>

"c" is reserved for actions and v is reserved for attributes or values

</aura:component>

Source Link
Mohith Shrivastava
  • 92k
  • 19
  • 161
  • 214

The updated code is as below

<aura:component >

<aura:attribute name="Result" type="Integer" />
<ui:inputNumber aura:id="inputOne" label="Enter first number" />
 <ui:inputNumber aura:id="inputTwo" label="Enter second number" />
 <ui:inputNumber aura:id="inputThree" label="Enter third number" />
 <ui:button aura:id="calculateButton" label="Calculate" press="{!c.calculate}"    />

<div>
Output: <ui:outputNumber aura:id="totalValue" value="{!c.Result}" />
</div>

"c" is reserved for actions and v is reserved for attributes or values

</aura:component>