This question is not asking how to get access to looping variables like i, first, last but how to retrieve and set variable as TEMPLATE VARIABLES.
This is not working...
<div #lastElement="arr[arr.length-1]"></div>
So I actually need to create a local variable in component then bind it directly?
I feel lots of stuff I can do it with ng-* directives in the past are all required to hardcode in Component... Kind of degrading tbh
You can't assign arbitrary values to template variables. Template variables are for references to elements and directives and locals used for structural directives.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments