I made this plunkr to show you what I want to get.
Actually the first part is working well but when I want to put it in a ngfor
and nothing is working as intended.
What's working :
<div>
<button (click)="showDownloadLink(link1)" flex="auto">CLICK ON ME SENPAI ! </button>
<a id="test_link" #link1 href="" (mouseover)="in()" (mouseout)="out()" hidden> Jquery should execute on hover </a>
</div>
<div>
<button (click)="showDownloadLink(link2)" flex="auto">CLICK ON ME SENPAI 2 ! </button>
<a id="test2_link" #link2 href="" (mouseover)="in()" (mouseout)="out()" hidden> Jquery 2should execute on hover </a>
</div>
What's not working :
<div *ngFor="#link of links">
<button (click)="showDownloadLink(link)" flex="auto">CLICK ON ME SENPAI ! </button>
<a id="test_link" #link href="{{link}}" (mouseover)="in()" (mouseout)="out()" hidden> Jquery should execute on hover </a>
</div>
Any ideas?
EDIT : Both answer are working perfectly but can't accept both