Open sverma16 opened 7 years ago
which article do you mean?
sorry for the delay :D had to configure my github notifications, now I get instant feedback 👍
having *ngFor
you got automatically associated the current item to the variable you define within the expression.
like
<div *ngFor="let item of items; let i = index">
<span>Index: {{i}} title: {{item.title}}</span>
</div>
Sorry to miss the link. Here is the article https://www.xplatform.rocks/2016/01/07/angular2-quicky-local-template-variables/
I understand that these variables cannot and should not be created dynamically.
Ah I see,
what's the use case? What do you want to achieve by storing those values as dedicated variables?
If you could describe the use case a bit more, I can give you a better advice.
😄
Thorton
Thanks for a very informative article. Can these variables be created dynamically? ie depending on the number of records can i create #firstname_0, #firstname_1 using a *ngFor index?
SV