It looks like your sys_id is an empty array.
I think you need to assign the data in your getSys() method.
this.service.getSys(this.customer_id).subscribe((data) => {
this.loading = true;
console.log('Data' + data);
for(var i = 0; i < data.length; i++){ // loop through the object array
this.sys_id.push(data[i]); // push each element to sys_id
}
this.loading = false;
console.log('Result - ', data);
console.log('data is received');
})
No comments:
Post a Comment