Trying to use a QueryList in a for ... of loop in typescript yields the following compilation error:
Type 'QueryList<MyHero>' is not an array type or a string type.
Usage example:
@ViewChildren(MyHero) myHeroes: QueryList<MyHero>;
recallAllHeroes(){
for (let myHero of this.myHeroes) {
// ...
}
}
Adding @vsavkin for reference.
Trying to use a
QueryListin afor ... ofloop in typescript yields the following compilation error:Usage example:
Adding @vsavkin for reference.