I have slds-nav-vertical
which will iterate the list with the icon. I'm using slds-icon_container
But icon is not coming it's Look like Below.
On clicking the above link getting following error Uncaught TypeError: Cannot read property 'menuItemId' of undefined throws at
<template for:each={studentdata} for:item="stu" for:index="index">
<div class="demo-only slds-p-left_xx-large" key={stu.Id}>
<nav class="slds-nav-vertical" aria-label="Sub page">
<ul aria-describedby="entity-header">
<li class="slds-nav-vertical__item">
<a class="slds-nav-vertical__action" data-menu-item-id={stu.Id}
aria-current="true" onclick={studentInformation}>
<span class="slds-icon_container slds-icon-standard-account"
title="Description of icon when needed">
<svg class="slds-icon" aria-hidden="true">
<use
xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#account">
</use>
</svg>
<span class="slds-assistive-text">Description of icon when
needed</span>
</span>
{stu.Name}</a>
</li> </ul>
</nav>
</div>
</template>