removehtmltags.ts 243 Bytes
Newer Older
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, "") : ""
    }
}