Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

angular strip html tags pipe

import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'stripHtmlTags'
})
export class StripHtmlTagsPipe implements PipeTransform {

  transform(value: string, ...args: string[]): string {
    return value.replace(/<[^>]*>/g, '');
  }
}
 
PREVIOUS NEXT
Tagged: #angular #strip #html #tags #pipe
ADD COMMENT
Topic
Name
2+9 =