Pipe to format numbers using Globalite.

{{ value | gnumber }} Uses the default number format and current locale.
{{ value | gnumber:'f' }} Uses the number format 'f' and current locale.
{{ value | gnumber:'f':'de' }} Uses the number format 'f' and the locale 'de'.

Hierarchy

  • BaseNumberPipe
    • GlobalizeNumberPipe

Implements

  • PipeTransform

Constructors

Properties

changeDetector: ChangeDetectorRef = ...
localeService: LocaleService = ...

Methods

  • Returns string | NumberFormatOptions

  • A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

    Returns void

  • Parameters

    • input: undefined | null
    • Optionalformat: string
    • Optionallocale: string

    Returns null

  • Parameters

    • input: number
    • Optionalformat: string

    Returns null | string

  • Parameters

    • input: number
    • format: string
    • locale: string

    Returns string

  • Parameters

    • input: undefined | null
    • Optionaloptions: NumberFormatOptions
    • Optionallocale: string

    Returns null

  • Parameters

    • input: number
    • Optionaloptions: NumberFormatOptions

    Returns null | string

  • Parameters

    • input: number
    • options: NumberFormatOptions
    • locale: string

    Returns string

  • Parameters

    • input: Observable<undefined | null | number>
    • Optionaloptions: NumberFormatOptions
    • Optionallocale: string

    Returns null | string

  • Parameters

    • input: Observable<undefined | null | number>
    • Optionalformat: string
    • Optionallocale: string

    Returns null | string

  • Parameters

    • input: number
    • optionsOrFormat: string | NumberFormatOptions
    • locale: string

    Returns string