1

Currently I am writing a component, I want to give as input a pipe. I tried to use

export class exampleComponent implements OnInit {
   @Input pipe;
}
{{ text | pipe }}

but it is trying to get a pipe named 'pipe'. I want to use the pipe that it received from the input.

any ideas on how to do this?

Farid Garciayala
  • 368
  • 1
  • 5
  • 7
  • 1
    You cannot just pass something and use it as a pipe. Please look at [this question](https://stackoverflow.com/questions/36564976/dynamic-pipe-in-angular-2) it may help you – Shlang Mar 30 '20 at 20:19

0 Answers0