A
A
alex_belouss2017-01-28 21:55:52
Angular
alex_belouss, 2017-01-28 21:55:52

How to strip tags in Angular?

There is such a code

<ion-card *ngFor="let item of classifiedData">
    <ion-card-content>
      
       {{item.body}}
      
    </ion-card-content>
     <ion-row no-padding>
      <ion-col text-right>
        <button ion-button clear small color="danger" icon-left>
           <ion-icon name='share-alt'></ion-icon>
          Подробнее
        </button>
      </ion-col>
    </ion-row>
  </ion-card>

In {{item.body}} there is text together with a p tag, when outputting the tags are displayed as is: text
I need to either cut the tags somehow or have them applied.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Stroykin, 2017-01-28
@alex_belouss

Example
Instead of "item.body" insert what you want to display in a "div" along with html markup

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question