Cannot read property ‘value’ of undefined
This means that you are trying to access the value property of something that is undefined, which you are doing a couple of times:
<b [innerHTML]=“datadetail.data[‘value’]”>
So, at the time you are trying to access these values they are not yet defined. An easy way to get around this is just to use the safe navigation operator, i.e:
datadetail?.data.value
<b [innerHTML]=“datadetail?.data.value”>
Rather than assuming that datadetail exists, using this syntax will first check if it exists before attempting to access the title property.
Just to get this out of the way, I would strongly urge you to reconsider innerHTML, period. It deliberately doesn’t do much of what people want it to, and it encourages what I would consider unhealthy mixing of presentation and logic. Also, I plead with you to stop using any - it blinds your build tools so they cannot help you, and it makes your code significantly harder to read and maintain.
I also always use and recommend the following options in tsconfig.json, one of which would have caught this problem before you ever had to post this thread:
Any controller property that is referenced in a template should be initialized to something sane at the point of declaration (if at all possible), or in the controller’s constructor at the very latest. ngOnInit is too late, even if the value wasn’t coming from an asynchronous source.