0


i am trying to display data from API in Angular 8 But this API include a html code
and when i try to show it in the page the html show up without working Like this enter image description hereenter image description here

i am wondering how can i compile the html to look like it supposed to be

Mohamed Atef
  • 115
  • 8

1 Answers1

1

This is answered here: Angular HTML binding

You can use either this: <div [innerHTML]="current_page.data.details"></div>

or <div innerHTML="{{current_page.data.details}}"></div>

Check the reference: https://angular.io/guide/template-syntax#property-binding-vs-interpolation

sleimanov
  • 61
  • 3