[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[x] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:
To translate in templates I have to use the transloco pipe. Is there any possible way to rename or wrap it around my own pipe like as follows?
import { Pipe } from '@angular/core'
import { TranslocoPipe } from '@ngneat/transloco'
@Pipe({
name: 'translate'
})
export class TranslatePipe extends TranslocoPipe {}
This is a way people found out to rename external pipes: https://stackoverflow.com/questions/52470434/using-a-pipe-under-a-different-name. However when I try it stops working.
Cheers on the library, best library for translations in Angular right now! ;)
I should be able to extend TranslocoPipe with a custom pipe and it should still work, or be able to wrap it.
@Pipe({
name: 'translate',
pure: false
})
export class TranslatePipe extends TranslocoPipe {}
I wouldn't recommend doing this. Some devtools rely on this name.
Thanks! That's what I was looking for.
Most helpful comment
I wouldn't recommend doing this. Some devtools rely on this name.