Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public transform(value: Translate, ...args: any[]): string | any {
if (typeof value === 'object') {
return value[this.translate.currentLang];
} else {
return new ngxTranslate(this.translate, this.cdr).transform(value, ...args);
}
}
return (detector: ChangeDetectorRef) => new TranslatePipe(translateService, detector);
}