Pipe to format boolean values using Globalite.

{{ true | gbool }} Uses the default boolean format and current locale. shows 'yes' in English, 'ja' in German, etc.
{{ false | gbool }} Uses the default boolean format and current locale. shows 'no' in English, 'nein' in German, etc.
{{ true | gbool:'': 'de' }} Uses the default boolean format and the locale 'de'. (shows 'ja')

Hierarchy

  • BaseGlobalizePipe<boolean, never>
    • GlobalizeBooleanPipe

Implements

  • PipeTransform

Constructors

Properties

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

Methods

  • Gets the default options or format for the boolean pipe.

    Returns string

    The default format.

  • 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: boolean
    • Optionalformat: string

    Returns null | string

  • Parameters

    • input: boolean
    • format: string
    • locale: string

    Returns string

  • Parameters

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

    Returns null

  • Parameters

    • input: boolean
    • Optionaloptions: undefined

    Returns null | string

  • Parameters

    • input: boolean
    • options: never
    • locale: string

    Returns string

  • Parameters

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

    Returns null | string

  • Parameters

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

    Returns null | string

  • Transforms the input boolean value to a formatted string based on the provided locale.

    Parameters

    • input: boolean

      The boolean value to format.

    • _: string

      Unused parameter for options format.

    • locale: string

      The locale to use for formatting.

    Returns string

    The formatted boolean value.