I am facing a problem to push data in a list here is my code.
labelListSelected: Label[];
onChange(object,flag){
if(flag==false){
this.labelListSelected.push(object);
}
console.log(this.labelListSelected);
// console.log(object.Id+" : "+flag);
}
i guess its null pointer, change to:
labelListSelected: Label[] = [];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.