New: Headless Commerce with Remix! read more

DurationPipe

DurationPipe

Displays a number of milliseconds in a more human-readable format, e.g. “12ms”, “33s”, “2:03m”

Example

{{ timeInMs | duration }}

Signature

class DurationPipe implements PipeTransform {
  constructor(i18nService: I18nService)
  transform(value: number) => string;
}

Implements

  • PipeTransform

Members

constructor

method
type:
(i18nService: I18nService) => DurationPipe

transform

method
type:
(value: number) => string