Is there a way to dynamically set the #id attribute, the HTML that angular uses to create a link to the @ViewChild element?
Specific need: I have the following template created by iterating through * ngFor, and I wanted to assign an angular id to the iteration.
<ul>
<li *ngFor="let link of links">
</li>
</ul>
And after it is interpreted, it will end up with something like:
<ul>
<li #link1>
</li>
<li #link2>
</li>
</ul>
Now I know about many other ways to get elements, I can assign # to an ul element, etc. etc. but I wonder if there is a way to do this on ngFor.
CHANGE AFTER AFTER RESPONSES AND INCREASE OF COMBINATIONS:
, , * ngFor.
, , , .