Closed tflori closed 7 years ago
The main problem is to get a pipe instance by it's name (not the class name). I have an open question regarding this problem on stackoverflow.
When I don't get an answer I see only one solution: you will have to configure allowed pipes in the configuration. Maybe even with the name (depends if we can get the name from the pipe decorator).
It seems it is currently not possible to get the pipes from compiler. Maybe a feature request will be successful.
Anyway I created a prototype it could work: https://github.com/tflori/angular-translator/commit/558b9b17ad7404afa5237a73a25e14c635273357
There are two drawbacks:
TranslatorModule.forRoot()
the pipes you want to use in translations (except the pipes from common module)If you want to try there is a dev release for this prototype:
npm install angular-translator@2.1.0-dev-pipes
Currently it is not possible to use any pipe - it would be very helpful when it will work.