Comments (4)
$idle.watch()
will reset state (both the idle state and the timers) and start a new time out. $idle.unwatch()
will cancel all timeouts and stop running.
So, use watch if you want to start or reset, and unwatch if you want to pause or stop watching for idle.
Watch is the one you want.
Sent from my mobile phone.
On Aug 14, 2014, at 9:48 AM, Tihomir Kit [email protected] wrote:
I am not clear on how am I supposed to manually reset the timer so it wouldn't broadcast the $idleStart event?
Am I supposed to use:
$idle.watch();
or$idle.unwatch();
$idle.watch();
or$idleProvider.keepAlive();
or$keepalive.ping();
// this one would probably need to be used in combination with a
// broadcast listener and one of the mentioned above?
Sorry if you feel this is a dumb question, but I'm just not clear which one of these should I use to reset the timer? What are the differences between them?Thanks in advance
—
Reply to this email directly or view it on GitHub.
from ng-idle.
Thank a lot.
from ng-idle.
To be clear, if the user has timed out or you manually want to extend their session (because it is idle and in the warning/countdown phase), all you need is a single watch()
call.
from ng-idle.
That was exactly what I needed, thanks. :)
from ng-idle.
Related Issues (20)
- [Question] Keepalive event in multiple tabs
- Issue in multiple tabs HOT 2
- Angular 5 - generic component child used in several main component not working
- Not want to reset timer in case of user intervention in app HOT 1
- Any plans to upgrade to Angular 6 HOT 1
- AngularJs - Unknown provider : IdleProvider HOT 1
- ng-Idle/core onIdleStart and onTimout function executing multiple times
- Having issues with ng-idle/core onIdleEnd & Mat-Dialog HOT 1
- keepalive onPingResponse subscribe response doesnt work right
- set url string parameter of http() dynamically
- Using JS Alert does not timeout until OK is Clicked HOT 1
- Key Management: Hardcoded Encryption Key HOT 1
- Select box (with multiple selections) not working properly
- unable to mock inactivity time with cypress clock/tick()
- How to use localstorageservice to handle in multiple tabs in the same browser HOT 1
- Incompatible with Angular 10 HOT 1
- Don't work with IFRAME HOT 3
- Keepalive interval not respected
- Implement a privacy preserving mode functionality avoiding usage of the persistent browser localStorage
- ng-idle not working for iOS in Ionic cordova
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-idle.