Lightning SALESFORCE Salesforce.com

Passing parameters from Lightning Component to Controller and Controller to Component

Passing parameters from Lightning Component to Controller and Controller to Component In this example to learn about to pass parameters from Lightning component to controller vice versa By using component.get(v.attributeName) or  component.find(“aura:id”).get(“v.value”) ->pass value from Lightning Component to Controller. By using component.set(“v.attributeName”,value);  -> pass value from Controller to…

Read More
Lightning

Value Binding with html elements in lightning Component

Value Binding with html elements in lightning Component HTML Markup: <a href=”javascript:void(0)” onclick=”{!c.onUserClick}” data-userid=”{!AccountDetail.CreatedBy.Id}”> {!AccountDetail.CreatedBy.Name} </a> Controller: onUserClick : function(component,event,helper){ var userId = event.currentTarget.getAttribute(“data-userid”); var navEvt = $A.get(“e.force:navigateToSObject”); navEvt.setParams({ “recordId” : userId, }); navEvt.fire() } (30)

Read More