TimeAgoPipe
TimeAgoPipe
Converts a date into the format “3 minutes ago”, “5 hours ago” etc.
Example
{{ order.orderPlacedAt | timeAgo }}
Signature
class TimeAgoPipe implements PipeTransform {
constructor(i18nService: I18nService)
transform(value: string | Date, nowVal?: string | Date) => string;
}
Implements
- PipeTransform
Members
constructor
method
type:
(i18nService: I18nService) => TimeAgoPipe
transform
method
type:
(value: string | Date, nowVal?: string | Date) => string