1Ref: https://github.com/urish/ngx-moment
2Import MomentModule into your app's modules:
3
4import { MomentModule } from 'ngx-moment';
5
6@NgModule({
7 imports: [
8 MomentModule
9 ]
10})
11If you would like to supply any NgxMomentOptions that will be made available to the pipes you can also use:
12
13import { MomentModule } from 'ngx-moment';
14
15@NgModule({
16 imports: [
17 MomentModule.forRoot({
18 relativeTimeThresholdOptions: {
19 'm': 59
20 }
21 })
22 ]
23})