This question may seem simple. I have a loop using *ngFor="let i of Items", and inside that loop there is an anchor tag
<a name=""></a>
I want the value of the name attribute to be a hash of the variable i.
So, I created a function in the .ts file called
public getAnchor(i: Item): string
However, using
<a name="getAnchor(i)"></a>
does not call the function, but simply displays it as text. And if I use <a name="{{ getAnchor(i) }}"></a>
, the page crashes.
I am new to Angular development. Can someone guide me on how to properly implement this? :)