### File

`src/lib/timeago-live.pipe.ts`

### Metadata

Name | timeagoLive
Standalone | `true`

### Methods

transform
`transform(input: string | number | Date)`
Defined in src/lib/timeago-live.pipe.ts:19
Parameters :
Name | Type | Optional
input | `string | number | Date` | No
Returns : `Observable<string>`

    import {
      Pipe,
      PipeTransform,
    } from '@angular/core';
    import {
      interval,
      map,
      Observable,
      startWith,
    } from 'rxjs';
    import { TimeagoFormatter } from './timeago.formatter';

    @Pipe({
      name: 'timeagoLive',
      standalone: true,
    })
    export class TimeagoLivePipe implements PipeTransform {

      transform(input: string | number | Date): Observable<string> {
        return interval(1000).pipe(
          map(() => TimeagoFormatter(input)),
          startWith(TimeagoFormatter(input)),
        );
      }

    }

# results matching ""

# No results matching ""