Skip to main content

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 comentarios
0/9000