I don\'t know what I\'m doing wrong but somehow i\'m not able to read data, though the data is coming from server in response and even the data is getting showed inside serv
This is probably because you are trying to access your allocatedAssetsLists before the data is actually returned from the service.
If you are accessing it in your template you can use a simple ngIf
to make sure you only try to display it once the data is available.
If this is not it, we need more information on your problem to help.
listByEmpId(empId:string){
this.adminService.getAllocatedAssets(empId).subscribe(
res => {
this.allocatedAssetsList = res;
console.log(this.allocatedAssetsList);
},
error => this.errorMessage = <any>error);
}