A directive that converts empty strings to null.

Hierarchy

  • BaseConverterDirective<string>
    • GlobalizeNullDirective

Constructors

Properties

injector: Injector = ...
localeService: LocaleService = ...

Accessors

Methods

  • Protected

    Determines if two values are equal.

    Parameters

    • v1: null | string

      The first value.

    • v2: null | string

      The second value.

    Returns boolean

    True if the values are equal, otherwise false.

  • Protected

    Coerces the value to the type supported by this directive

    Parameters

    Returns CoercedValue<string>

    The coerced value. If the v is of Type T, it should be returned as is. If it's null, null is returned If it's a string, it should be converted to the type T and returned. If the conversion from string fails, undefined should be returned.

  • Protected

    Formats the value for display.

    Parameters

    • v: string

      The value to format.

    Returns string

    The formatted value.

  • Protected

    Determines if two values are equal.

    Parameters

    • v1: string

      The first value.

    • v2: string

      The second value.

    Returns boolean

    True if the values are equal, otherwise false.