I have a project in Angular 7 where I am displaying a list of places. Whenever I hover over a place, an AJAX function is triggered to save that information in the database.
However, I noticed that the AJAX function is being called multiple times when I hover over a single element. I only want it to be called once.
Below is the Angular code snippet I am using:
<div *ngFor="let place of mapData" (mouseover)="displayTagInfo($event)">
<div class="filter-name">{{place.name}}</div>
</div>