Anchor Link Not Opening in *ngFor Directive

Discussão em 'Angular' iniciado por Raphael, Setembro 13, 2024.

  1. Raphael

    Raphael Guest

    In my angular template I have an *ngFor directive that loops through a list of items and renders a link for each:

    <div *ngFor="let item of items">
    <a href="{{ getLink(item) }}" target="_blank">
    {{ item.id }}
    </a>
    </div>


    I can right click on the links and open them in a new tab just fine, but when I left click them, nothing happens. Also, strangely, when I try to inspect the element, the developer console throws a warning message:

    Node cannot be found in the current page.

    Continue reading...

Compartilhe esta Página