1.0.2 • Published 5 years ago
ng-time-from-pipe v1.0.2
ng-time-from-pipe
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 |