mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-04-26 18:13:11 +00:00
11 lines
276 B
TypeScript
11 lines
276 B
TypeScript
import { Pipe, PipeTransform } from '@angular/core';
|
|
|
|
@Pipe({name: 'htmlToPlaintext'})
|
|
export class HtmlToPlaintextPipe implements PipeTransform
|
|
{
|
|
transform(value: string, args: any[] = [])
|
|
{
|
|
return value ? String(value).replace(/<[^>]+>/gm, '') : '';
|
|
}
|
|
}
|