I have 2 components that have the same function inside calls the pipe currency, as a component I can instantiate it correctly. I want to move these two functions to a service and call it, but I can’t instantiate the pipe, Angular goes into error circular dependency. **What is the correct way for add a pipe(currency) in a service on angular 17? **
Edit : I created an example project on stackbliz ( https://stackblitz.com/edit/stackblitz-starters-fsfaxk ), it worked, thanks to all.
Don't use pipes outside of components.
If you want the same feature in a service, use the
formatCurrencyfunction.