Hello all,
I couldnot able to get the basic Aura example output. below is the Applicaion, JS and Component code snippet. Please help me out where i was wrong.
When i click the button , the output should be displayed as "nothing and nothing here too"
but none has got displayed.
application
<aura:application extends="force:slds">
<c:JavascriptAura/>
</aura:application>
JS code
({
handleClick : function(component, event, helper) {
component.set("v.Mesg1", "nothing");
},
anotherHandleClick : function(component, event, helper) {
component.set("v.Mesg2", "nothing here too");
}
})
component code:
<aura:component >
<aura:attribute name = "Mesg" type= "string"/>
Hello : {!v.Mesg1}
<br/><br/>
Hai: {!v.Mesg2}
<br/><br/>
<lightning:button label="Press Here" onClick="{!c.handleClick}"/>
<lightning:button label="Click Here" onClick= "{!c.anotherHandleClick}"/>
</aura:component>
@Benazir Beham@* Salesforce Developers * #Trailhead Challenges #Salesforce Developer #Aura Components
@Benazir Beham sorry! my bad! Aura is Case sensitive, onClick should be onclick (no caps) Now its working ! :) :)
Thanks for quick response.