Amit Kundu
Amit Kundu

Reputation: 21

I want to trigger aura method on the click of lightning input checkbox. How i can do that?

Below i am pasting my code from cmp file and controller file>

cmp file>

 <div class="slds-p-around_small slds-grid slds-gutters">
           
            <lightning:input class="chkboxPadding" type="checkbox"  label="Attestation" name=" " onchange="{!c.checkAuraMethod}"  value=""/> 

  <div >  
{!v.applicantSpaceTaskWrapper.capitalLemoine}&nbsp;{!$Label.c.CLV1_Euro} 
  </div> 
            
 </div> 

Controller file below >

checkAuraMethod: function(component, event, helper){ Console.log('Checkbox clicked');

my onchange event is not working. console log is not showing

Upvotes: 0

Views: 893

Answers (1)

Amit Kundu
Amit Kundu

Reputation: 21

i found the answer my self , it was the issue of captial letter in console. JS is a case sensitive language so we should be careful.

Upvotes: 0

Related Questions