removehtmltags.ts 232 Bytes
Newer Older
Open Source Developer's avatar
Open Source Developer committed
1 2 3 4 5 6 7 8
import {Pipe, PipeTransform} from '@angular/core';

@Pipe({name: 'removetags'})
export class Removetags implements PipeTransform {
  transform(text: string) : any {
   	return text ? String(text).replace(/<[^>]+>/gm, '') : ''
  }
}