Options
All
  • Public
  • Public/Protected
  • All
Menu

Class IzAbstractPipe<Input, Params>

Parent class for each pipe that works with locale system

So far Angular does not support Observables in pipes so an impure pipe with an memoization optimization is used instead. All pipes that extend from this class must be marked as impure to work correctly. See issue angular/angular#15041 for more info.

Type parameters

  • Input

    Pipe input - type of stuff that is passed before | and pipe name in Angular template

  • Params: unknown[] = []

    Pipe params - array of types of stuff that is passed after pipe name in Angular template

Hierarchy

Implements

  • PipeTransform
  • OnDestroy

Index

Constructors

Methods

Constructors

constructor

Methods

Protected Abstract convert

  • convert(input: Input, ...params: Params): string
  • Actual pipe logic, extend this method to create locale-based pipe.

    Parameters

    • input: Input

      Pipe input

    • Rest ...params: Params

      Pipe params

    Returns string

transform

  • transform(input?: Input, ...params: Params): string
  • Angular Pipe API method that includes memoization. Actual code of the pipe should be implemented in convert method.

    Parameters

    • Optional input: Input

      Pipe input

    • Rest ...params: Params

      Pipe params

    Returns string

Generated using TypeDoc