I am facing an issue with my code where I have an ngFor loop. Within this loop, there is a div element and I need to pass the index value to the TypeScript file when this div is clicked.
As I am new to Angular 2, any guidance on how to achieve this would be greatly appreciated.
Example:
<div *ngFor="let y of characters; let i = index">
<div (click)="passIndexValue(i)">
</div>
<div>