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

688 views Asked by At

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

1

There are 1 answers

0
Amit Kundu On

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.