R
R
Roman Rakzin2021-01-28 14:58:18
JavaScript
Roman Rakzin, 2021-01-28 14:58:18

Why doesn't Angular's innerHTML render the code in the frame and not all the markup elements?

I put this code, where the value contains the text of the whole page with frames, video, photo, text. Only text with styles is displayed, and links to YouTube in the frame and "flew" somewhere.

<div [innerHTML]="store.selectedPost['content']['rendered']"></div>

Is it something to do with security? How to make everything displayed "as it is in the code"?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tigran Abrahamyan, 2021-01-28
@TwoRS

https://stackblitz.com/edit/angular-ivy-ikdxzr?fil...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question