Currently, I am facing an issue is that I want index starting from value "1"
I am using for:each
in my code.
<template>
<lightning-card title="HelloForEach" icon-name="custom:custom14">
<ul class="slds-m-around_medium">
<template for:each={contacts} for:item="contact" for:index="index">
<li key={contact.Id}>
{index} {contact.Name}, {contact.Title}
</li>
</template>
</ul>
</lightning-card>
</template>
I have added Screenshot Below. I want this {index}
starting from value "1" rather than "0" . I have also tried {index+1}
but it throws an error .
Here is the Playground link.
Thanks in Advance