grbsk / ng-idle

Responding to idle users in AngularJS applications.
http://hackedbychinese.github.io/ng-idle
MIT License
564 stars 195 forks source link

*Feature Request* - `getTimeUntilIdle()` #191

Open wootencl opened 7 years ago

wootencl commented 7 years ago

Enhancement/feature request: Think it would be pretty cool to have a getTimUntilIdle() method that returns how much longer until the user is going to become idle. Currently I can figure this out by digging into local storage and accessing the ngIdle.expiry key, but worry if that key changes names in the future my code will become broken. Locking down version for now in order to remedy that possible issue but it would be nice to have a method that provided that functionality. I could provide my use case for it if desired though i'm sure it's fairly edge case.

Outside of that, thanks for the excellent module! May be able to make a PR for this feature (if you'd be willing to accept) time permitting.