Closed david-gang closed 8 years ago
Indeed, sorry. I was a little gunshy about putting one together with Angular state being in a beta flux. Oddly enough, there is an example in the README for the ng2-idle-keepalive plugin for ng2-idle. I'll refresh with the latest Angular beta and add a sample.
So on that note, what am I doing wrong with
idle.setIdle(5);
idle.setTimeout(5);
idle.setInterrupts(DEFAULT_INTERRUPTSOURCES);
idle.onIdleStart.subscribe(response => {
console.log('idling');
console.log(response);
});
idle.onIdleEnd.subscribe(response => {
console.log('idle ended');
console.log(response);
});
idle.onTimeout.subscribe(response => {
console.log('timed out');
});
seems like the correct direction based on your source but none of my subscribes are triggering. If I figure it out before you get back on I'll try to update here.
I think you need to call idle.watch() to get it started.
Hi,
It would be great to have a code snippet to see how to use the Idle service.
Thanks, David