When I use a pipe in the context of a host attribute, as in the example below, it cannot be found even if I register it in that component:
@Component({
selector: '[with-parenthesized-text]',
host: {
'[inner-html]': ' myText | parenthesize ' // <-- (1) using pipe here
},
pipes: [Parenthesize], // <-- (2) but registering it here is not enough
template: ``
})
It results in the error: Cannot find pipe 'parenthesize'. It seems the pipe needs to be registered in the parent component. I suspect this is not intended behavior.
Here is a simple plunker to illustrate the issue.