Skip to main content
Hi All,

I have a requirement to create a lightning component in which i want to display the images as links. On clicking the image an action should be called from the Js controller. Please let me know how to do this in lightning.
9 respuestas
  1. 2 may 2019, 16:29
    Hi All,

    Using the attribute 'title' instead of value worked for me.

    Component :

    <div class="slds-align_absolute-center" onclick = "{!c.createRecord}" title = "Airport Fam Trip">

    Controller :

    createRecord: function(component, event, helper) {

    var createRecordEvent = $A.get("e.force:createRecord");

    var recid, rectype,RecTypeID;

    rectype = event.currentTarget;

    RecTypeID = rectype.getAttribute("title");

    Thank you to all for your help. 

    Shivangi

     
0/9000