Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49082

Cannot read property 'value' of undefined

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 49082

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>