Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (13 sloc) 406 Bytes
// idea from https://github.com/a8m/angular-filter
import {Pipe, PipeTransform} from '@angular/core';
import {isString, isUndefined} from '../utils/utils';
@Pipe({
name: 'stripTags'
})
export class StripTagsPipe implements PipeTransform {
transform(input: string): any {
if (!isString(input) || isUndefined(input))
return input;
return input.replace(/<\S[^><]*>/g, '');
}
}
You can’t perform that action at this time.