In Angular I have an ngFor
loop iterating over an array of form groups. The loop looks like this:
<div *ngFor="let fg of arrayOfFormGroups" [attr.fg]="fg">
</div>
Would it somehow be possible to access this fg
with pure JavaScript? When I do the following in the Chrome console:
nativeElement.attributes.getNamedItem('fg').value;
I only get "[object Object]"
string value.
Is what I am trying to achieve possible?
The reason why this is relevant is that I'm developing keyboard navigation, and using the nextElementSibling
attribute would make it a breeze, but I need to get hand of this fg
.