HTMLCollection.length returning 1 despite of having multiple elements

25 views Asked by At

I am getting an HTMLCollection after using below code in angular

import { ElementRef } from '@angular/core';

constructor(private el : ElementRef){}

const ele = (<HTMLElement>this.el.nativeElement).querySelector('.k-grid-table').children[1].children;

above code is returning below HTMLCollection in console but when I do ele.length it returns only 1 despite of having multiple tr elements . can someone please assist me on how to iterate over ele and why ele.length is returning 1??

console

0

There are 0 answers