UNPKG

tfabrica

Version:

library for TFabrica - TechSol

17 lines (13 loc) 483 B
import { Pipe, PipeTransform } from '@angular/core'; import { TfabricaTranslateService } from './tfabrica.translate.service'; // our translate service @Pipe({ name: 'translate', pure: false }) export class TfabricaTranslatePipe implements PipeTransform { constructor(private _translate: TfabricaTranslateService) { } transform(value: string, args: any[]): any { if (!value) return; return this._translate.instant(value); } }