import { Pipe , PipeTransform , NgModule } from '@angular/core' ; import { isString , isUndefined } from '../utils/utils' ; @ Pipe ( { name : 'stripTags' , } ) export class StripTagsPipe implements PipeTransform { transform ( input ) { if ( ! isString ( input ) || isUndefined ( input ) ) return input ; return input . replace ( /<\S[^><]*>/g , '' ) ; } } @ NgModule ( { declarations : [ StripTagsPipe ] , exports : [ StripTagsPipe ] , } ) export class NgStripTagsPipeModule { }