import { Pipe , PipeTransform } from '@angular/core' ; import { FormatterService } from '@core/formatter.service' ; @ Pipe ( { name : 'sharedNumber' } ) export class NumberPipe implements PipeTransform { constructor ( public formatter ) { } param value param decimals param units param empty return { String } transform ( value , decimals ? , units = '' , empty = this . formatter . empty ) { return this . formatter . number ( value , decimals , empty , units ) ; } }