Skip to main content

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

constructor

method
(i18nService: I18nService) => DurationPipe

transform

method
(value: number) => string