Follow

It took me way longer than it should have, so I'm gonna share in case any other Angular beginner needs this.

If you want to render a property binding that contains HTML instead of plain text, use the innerHTML property:
<div [innerHTML]="page.attributes.body.processed"></div>

The property binding is now rendered as HTML inside the div (replace "page.attributes.body.processed" to your needs).

stackoverflow.com/a/34424375

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml