Description of the Issue and Steps to Reproduce:
Did you search for duplicate issue? [Yes / no]
Please describe the issue and steps to reproduce, preferably with a code sample / plunker:
Adding the relativeTimeThresholdOptions object to the imports as shown in the Usage section of the readme doesn't change the moment relative time thresholds.
Demo
Please see StackBlitz demo here
Notes
- The
relativeTimeThresholdOptions object is set in app.module.ts and should set the ss threshold to 1 (so that seconds start showing nearly right away).
- Checking the
ss threshold value returns 44, which is the default (s == 45, ss == s - 1).
- You can see the desired behavior by editing
app.component.ts, uncommenting line 16.
- Note that StackBlitz won't automatically reload moment if you comment line 16 out again, so reload the preview pane to be sure you see the changes.
The workaround is to set moment.relativeTimeThreshold manually, but this is kludgy.
Ensure your issue is isolated to ngx-moment. Issues involving third party tools will be closed unless submitted by the tool's author/maintainer.
Environment:
Please answer the following questions:
- Angular version?
^8.0.0 & higher
- TypeScript version?
~3.1.1
moment version?
^2.24.0
- Are you using
moment-timezone?
no
- Are you using the angular-cli?
yes
- Using Rollup/Webpack/System.js/Ionic/similar?
n/a
Description of the Issue and Steps to Reproduce:
Did you search for duplicate issue? [Yes /
no]Please describe the issue and steps to reproduce, preferably with a code sample / plunker:
Adding the
relativeTimeThresholdOptionsobject to the imports as shown in the Usage section of the readme doesn't change the moment relative time thresholds.Demo
Please see StackBlitz demo here
Notes
relativeTimeThresholdOptionsobject is set inapp.module.tsand should set thessthreshold to1(so that seconds start showing nearly right away).ssthreshold value returns44, which is the default (s==45,ss==s - 1).app.component.ts, uncommenting line 16.The workaround is to set
moment.relativeTimeThresholdmanually, but this is kludgy.Ensure your issue is isolated to ngx-moment. Issues involving third party tools will be closed unless submitted by the tool's author/maintainer.
Environment:
Please answer the following questions:
^8.0.0 & higher
~3.1.1
momentversion?^2.24.0
moment-timezone?no
yes
n/a