How do I get the result of a JSON where the result is HTML and in Ionic's View render HTML?

0

I have a JSON where the contents of some fields are HTML, I would like to display the HTML in the view of Ionic already rendered.

This is JSON:

[{"data":"2018-09-05","categoria":"1","desafio":"
\r\n
Burp 20x1<\/li>\r\n
Teste 30x4<\/li>\r\n
Variação 50x10<\/li>\r\n<\/ul>\r\n
Competição<\/strong><\/p>\r\n

\r\n
Luta livre<\/li>\r\n
Burp<\/li>\r\n<\/ul>","titulo":"Desafio do Dia"}]

The "challenge" field is in HTML, how to render HTML in the View?

<ion-header>
  <ion-navbar color="dark">
    <ion-title text-center>Workout do Dia</ion-title>
  </ion-navbar>
</ion-header>
<ion-content padding>
  <div class="container">
    <ul *ngFor="let workout of workoutdetalhes">
      <li><span></span>
        <div>
          <div class="title">{{workout.titulo}}</div>
          <div class="info">{{workout.desafio}}</div>          
        </div> 
      </li>    
    </ul>
  </div>
</ion-content>
    
asked by anonymous 05.09.2018 / 19:05

1 answer

1
<div [innerHTML]="workout"></div>
    
05.09.2018 / 19:14