Add the input checkbox and its handler in the salesforce lightning component #inSalesforce

Add the input checkbox and its handler in the salesforce lightning component #inSalesforce


On your component page: 


<aura:component implements="flexipage:availableForAllPageTypes">
        <ui:inputCheckbox aura:id="demo" label="Sample" change="{!c.onCheck}"/>
</aura:component>



Client-side controller page:


({
    onCheck: function(cmp, event, helper){
        alert("!!!!!!!sample!!!!!!!");
        var checkboxCmp = cmp.find("demo");
        alert(checkboxCmp.get("v.value"));
    }
})








Visual: https://www.youtube.com/watch?v=P8u6gOR62sI


Comments