Skip to content

A simple pipe to display the time passed from the input date in real time.

License

Notifications You must be signed in to change notification settings

MrHarrisonBarker/ng-time-from-pipe

Repository files navigation

ng-time-from-pipe

npm npm GitHub issues NPM Build&Publish

A simple pipe to display the time passed from the input date. Also includes a <time-from> component with hover switching effect (switch between time from and raw date format).

Updates as time passes.

Install

npm install ng-time-from-pipe

Usage

You can import in the @NgModule.

import { TimeFromPipeModule } from "ng-time-from-pipe";

then add to imports array.

@NgModule( { 
  declarations: [ ... ],
  imports: [ ..., TimeFromPipeModule, ... ]
})

you can choose between the time from pipe and the time from component (time from component has hover effect).

<time-from [value]="date"></time-from>
Attribute Type
value Input date toe be formated
<span>{{ date | timeFrom  }}</span>
Attribute Type
value Any. Date to be formated
isOn Boolean. Turns on and off pipe