I have a function that is used to calculate the left margin which will be assigned to list elements. The issue is that the id for the list element is generated when the page loads and has a binding to it:
<li *ngFor "let msg in messages; let i in index;" id="#messages-{{i}}"> ... </li>
How can I use my function to assign the margin to these list contents? Every li element will have different margins.
idattribute?