function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kakasaheb EkshingeKakasaheb Ekshinge 

How to run lightning components..???

I have below code so I run this ...
<aura:component implements="force:appHostable">
    <form>
    <fieldset>
    Enter three values:<br/>
    <ui:inputNumber aura:id="inputOne" label="Input One" /><br/>
    <ui:inputNumber aura:id="inputTwo" label="Input Two"/><br/>
    <ui:inputNumber aura:id="inputThree" label="Input Three"/><br/>
    <ui:button label="Calculate value" press="{!c.calculate}"/><br/>
        
    <ui:outputNumber aura:id="totalValue" value=""/>
   </fieldset>
</form>
</aura:component>

*Controller is *
({
    calculate : function(component, event, helper) {
        var input1=component.find("inputOne").get("v.value");
        var input2=component.find("inputTwo").get("v.value");
        var input3=component.find("inputThree").get("v.value");
        var totalval=parseInt(input1)+parseInt(input2)-parseInt(input3);
        var outputval = component.find("totalValue");
        outputval.set("v.value", totalval);
    }
})



 
Best Answer chosen by Kakasaheb Ekshinge
Himanshu ParasharHimanshu Parashar
You will create a new lighting application in developer console.


User-added image



and put following code in that

 
<aura:application >
      <!-- put your component name here in my example component name is Manage_User-->
       <c:Manage_User />
  
</aura:application>


and after that click on preview button on the right


User-added image


Hope it will help you.


Thanks,
Himanshu