0

How do I display the JSON formatted in HTML in Angular? This is my current code in HTML:

<h5>Konsep Produk</h5>
<br />
{{productConcept}}

This is a sample of the JSON data:

"key": "AAA",
"value": "<b>Heading</b>Description Here",
ohayoouuuu
  • 5
  • 1
  • 2
  • Use the JSON pipe : `{{productConcept | json}}`. Really, a simple Google search would have given you the answer, no need to ask for help here :) – Jeremy Thille Jan 07 '22 at 08:35
  • Some like `
    `. make the trick. but it's possible was neccesary ["sanitize"](https://angular.io/api/platform-browser/DomSanitizer). For this, you can inject domSanitizer in constructor `constructor(public domSanitizer:DomSanitizer){}` and use `
    `
    – Eliseo Jan 07 '22 at 11:26

0 Answers0