0

Is it possible to use CustomPipe in lazy modules without using common or shared modules. I don't want to write pipe for every module.

Below is my CustomPipe.ts

    import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';

@Pipe({
  name: 'bypassHtml'
})

export class BypassHtmlPipe implements PipeTransform {

  constructor(private sanitizer: DomSanitizer) { }

  transform(value: any): any {
    return this.sanitizer.bypassSecurityTrustHtml(value);
  }

}

Thank you in advance

Ashish Gehlot
  • 483
  • 8
  • 16

0 Answers0