Skip to main content
Shivangi Verma (Slalom) 님이 #Lightning Experience에 질문했습니다
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개
  1. 2019년 5월 2일 오후 4: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