Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
anrepppp opened this issue Apr 13, 2018 · 2 comments

Comments

@anrepppp
Copy link

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 anrepppp changed the title How can we know the remaining time for idle? Can i know the remaining idle time, once it was set. Would like to watch the idle timer decreasing lively. Apr 13, 2018
@coolvasanth
Copy link

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

@dmbaker90
Copy link

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants