I'm really struggling to understand why I keep receiving an Undefined error for tagged_Assets
. Can someone please shed some light on this for me? Thank you.
Model.ts
export class TaggedAssests {
device_id: string;
hasTag: boolean;
}
Component.ts
tagged_Assets: TaggedAssests[];
Usage in Component.ts
for(let i = 0; i < this.temp.length; i++)
{
ERR-> this.tagged_Assets[i].device_id = this.temp[i].device_id;*
this.tagged_Assets[i].hasTag = true;
}