I am getting above error for following code: I have checcked for typos.
component:
<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>
Controller:
({
calculate : function(component, event, helper) {
var a= component.find('inputOne').get('v.value');
var b= component.find('inputTwo').get('v.value');
var c= component.find('inputThree').get('v.value');
var resultCalc=a+b-c;
//console.log('Values are: '+a+b+c+result);
component.set("v.Result", resultCalc);
}
})
Application:
<aura:application >
<c:CalculateTotal />
</aura:application>