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
rishabh rathor 18rishabh rathor 18 

i want to show 5 accounts as in tabs and when i select on any account (in tab) then account's email should displayusing lightning component

<aura:component controller="AccountTabsCntrl" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
        <aura:handler name="init" value="{!this}" action="{!c.doinit}" />
         <aura:attribute name="Accounts" type="List" />
     <aura:iteration items="{!v.Accounts}" var="acc">
        <lightning:tab  label="{!acc.Name}">
=========js controller=========
    doinit : function(component, event, helper) {
    var action = component.get('c.getAccounts');
    action.setCallback(this, function(response){
            var result =response.getReturnValue();
===========Apex controller==============
public class AccountTabsCntrl {
    public static list<Account> getAccounts(id accountIds){
    List<Account> accLIst = new List<Account>();
        accLIst = [Select id, Name,Phone from account where Id=:accountIds Limit 5];
        return accLIst;