function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sunil SirangiSunil Sirangi 

Lightning Component Framework Specialist SuperBadge - Issue with Step 8

Guys, In challenge 8, i was struck at the point of hyperlinking the CreatedBy to redirect to user detail page. How do we define hyperlinks in lightning. Can anyone share any info on this part.
Medhanie Habte 37Medhanie Habte 37
This should do it!
Controller Method
onUserInfoClick : function(component,event,helper){
        var userId = event.currentTarget.getAttribute("data-userid");
        var navEvt = $A.get("e.force:navigateToSObject");
            "recordId" : userId,
Relevant CMP Code
div class="slds-media__body">
                        <div class="slds-grid slds-grid_align-spread slds-has-flexi-truncate">
                            <p><a href="javascript:void(0)" onclick="{!c.onUserInfoClick}" data-userid="{!boatReview.CreatedBy.Id}">
                                — {!review.CreatedBy.CompanyName}