i had error on : [innerHTML]="datadetail.data[‘value’] , and my coding as below
in page.ts
parsing:any
ngOnInit() {
this.Service.datadetailData$.subscribe((res: any) => {
this.parsing=res;
console (‘check’,this.parsing); ---- console log : [{“data”:[{“columnID”:“0.45”,“value”:“4242”},{“columnID”:“0.398”,“value”:“2”}]}]
}
in html :
*ngFor=“let datadetail of parsing; let i = index”>
<b [innerHTML]=“datadetail.data[‘value’]”> ===error di console log : core.js:9110 ERROR TypeError: Cannot read property ‘value’ of undefined
tapi kalau cuma
<b [innerHTML]=“datadetail”>
how to troubleshooting for value error ?
thank you for your advice.
2 posts - 2 participants