RunicTextPipe class

Module @runic-artifex/angular in @runic-artifex/angular 0.23.0

class RunicTextPipe implements PipeTransform, OnDestroy

Shows a text reference in the window's language in a template, and marks the view for check when the language changes: {{ error.text | runicText: error.message }}, {{ state.status | runicText }}. A string shows as it is; null and undefined show the fallback argument; a field's error, {{ name.error() | runicText }}, the application's text for it (configureFieldErrorText). The pipe is impure so that it sees a language switch; it formats again only when the value, the fallback or the language changed, and returns its last text otherwise.

Properties

ɵfac

static ɵfac: i0.ɵɵFactoryDeclaration<RunicTextPipe, never>;

No documentation.

ɵpipe

static ɵpipe: i0.ɵɵPipeDeclaration<RunicTextPipe, "runicText", true>;

No documentation.

Methods

transform

transform(value: TextReference | FieldError | string | null | undefined, fallback?: string): string;

No documentation.

ngOnDestroy

ngOnDestroy(): void;

No documentation.