Z
Z
zachfischer2018-07-12 14:32:00
Angular
zachfischer, 2018-07-12 14:32:00

How to replace style tags with the font style itself?

Information was entered into the database with the help of some Editor'a, and now, when this information is displayed in a table, these Editor's tags are displayed to me. Let's say I have a regular table like this:

<table>
        <thead>
           <tr>
              <th>Наименование </th>
              <th>Статус </th>
           </tr>
        </thead>
        <tbody>
           <tr *ngFor="let post of posts" >
                <td >{{post.text}}</td>
                <td>
                     <input type="checkbox"  [checked]="post.is_active == 'Y'"  disabled />
                </td>
               </tr>
           </tbody>
 </table>

And this is what the output from the table looks like . How can I replace these tags with the font style?
I use this code to load data:
private loadPosts() {
    this.servPost.getPosts().subscribe(post => this.posts = post);
  }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2018-07-12
@zachfischer

Look for innerHTML in the documentation
https://angular.io/guide/template-syntax

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question