<div class="prod-div" *ngFor="let product of products; let i = index" [id]="i" routerLink="/prod-desc">
I have this code above on my home component.
I want to use a service to pass the index value to the prod-desc component so that it can display details depending on the contents of the products array for the component. How can I do this thanks!