Open
Description
Which @angular/* package(s) are relevant/related to the feature request?
No response
Description
In a signal world, we tend use signal to trigger the framework's reactivity.
Pipes, which date back to Angular.js times, are used to memoise function call (a bit like a computed) but don't fit well with signals today.
Among others here are the key caracteristics of Pipes
- Can be reused accross components
- Pipes instance are instantiated during the creation phase of the template
- Pipes can inject instances from DI
- Pure pipes are memoized, meaning that they only re-run when at least one of their parameters changes
- They can can be used without any additional defintion in the component implementation
On the other hand signals, mainly computed :
- Need to be define in the component
- Cannot be defined in a template, for example using items of a
@for
block.- We don't have syntax to define one in templates, to be defined only in creation mode
- The usage of DI rely on the injection at the component level
We can also note (cf #56401) that signals in the transform
implementation of pure pipes don't trigger any reactivity.
This is to sum-up that the intersection of Pipes and signal is today incomplete an does address the developer's expectations.