core
core copied to clipboard
Extend/Override TranslatePipe
Is it possible to extend the TranslatePipe?
E.g: showing the translation key next to the translation
@Pipe({
name: 'translate'
})
export class CustomTranslatePipe extends TranslatePipe {
transform(value: any, ...args: any[]): any {
let translation = super.transform(value, args);
if (DEBUG_ENABLED) {
translation += ` 'KEY: ${value}'`;
}
return translation;
}
}
put override
in front of transform