File

dev-kit/src/interpolate/interpolate.pipe.ts

Description

Replaces placeholders in the given template string with corresponding values from the args object.

Placeholders are defined using curly braces, e.g., {placeholder}.

Example :
<span>{{ "Hello, {name}! You have {count} new messages." | interpolate: { name: "Alice", count: 5 } }}</span>

Import

Example :
import { InterpolatePipe } from '@talenra/components/dev-kit';

Metadata

Methods

transform
transform(template: string, args: Record)
Parameters :
Name Type Optional
template string No
args Record<string | string | number> No
Returns : unknown

results matching ""

    No results matching ""