ng2-idle icon indicating copy to clipboard operation
ng2-idle copied to clipboard

Can i know the remaining idle time, once it was set. Would like to watch the idle timer decreasing lively.

Open anrepppp opened this issue 7 years ago • 2 comments

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[x] support request => Please do not submit support request here, instead see https://github.com/HackedByChinese/ng2-idle/blob/master/CONTRIBUTING.md#getting-help

Current behavior

I had a requirement to know when the idle timeout was half way there before complete?

Expected behavior

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • @ng-idle version: 2.x
  • Angular version: 2.x
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node: node --version =

anrepppp avatar Apr 13 '18 01:04 anrepppp

I too badly looking for this solution ? did u find anything with this regard?

coolvasanth avatar Jan 22 '20 11:01 coolvasanth

This is a hacky way to do it but you can read the expiry date from local storage:

    setInterval(() => {
        this.timeoutTime = localStorage.getItem('ng2Idle.main.expiry');
    }, 1000);
<p>Expiry: {{timeoutTime | date: 'longTime'}}</p>

dmbaker90 avatar Nov 05 '20 05:11 dmbaker90