import { Pipe , PipeTransform } from '@angular/core' ; @ Pipe ( { name : 'ngxPlural' } ) export class PluralPipe implements PipeTransform { transform ( input , label , pluralLabel = '' ) { input = input || 0 ; return input === 1 ? `${ input } ${ label }` : pluralLabel ? `${ input } ${ pluralLabel }` : `${ input } ${ label }s` ; } }