Skip to main content
prasanth sai (Cloudalyze) 님이 #Trailhead Challenges에 글을 올렸습니다

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. 

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.

 

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

댓글 3개
  1. 2022년 8월 26일 오후 5:58

    @Benazir Beham sorry! my bad! Aura is Case sensitive, onClick should be onclick (no caps) Now its working ! :) :)

    Thanks for quick response.

0/9000