I need to do some tasks inside a component which require non-transformed text. Yet I want to be able to pass pipes alongside the text. I would like to either pass the pipes as parameters for the component and call them later - or if that is not possible, delay the execution of the transformations and inject my own before that. I can not use my own pipe since it
would require all other pipes to be called afterwards and
is a stateful transformation (I need to know if the text is currently collapsed or not)
I tried simply passing the pipes in an array to an @Input field in the component, and I tried to pass them as strings and then resolve the pipe-names to retrieve the pipe-instances, both unsuccessfully. My first approach was to create a pipe of my own, but since I need to store the state of the text I can't really use pipes.
This was how I would like to set up my component (which does not work obviously)
<collapsible-content [text]="item.data.message"
[pipes]="[markdown, hashtags, mention]">
</collapsible-content>