[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] 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
If we set the setIdle to whatever seconds. It doesn't raise onIdleStart event as per configured time. This happens normally if we set the timeInterval more than 5 seconds.
this.idle.setIdle(30);
It has been observed from console logs that the last value calculation is wrong. last value from LocalStorageExpiry.last() is coming wrong. Below is the sample code -
this.idle.setIdle(30);
const idleTimeout: number = parseInt(10);
// sets a timeout period of 5 seconds. after 10 seconds of inactivity, the user will be considered timed out.
// sets the default interrupts, in this case, things like clicks, scrolls, touches to the document
this.idle.setInterrupts(DEFAULT_INTERRUPTSOURCES);
const timeout = this.idle.getTimeout();
this.idle.onIdleEnd.subscribe(() => {
this.logger.debug('You are no longer idle. Click "OK" to close the warning dialog')
});
this.idle.onTimeout.subscribe(() => {
this.logger.debug('Timed out!');
});
this.idle.onIdleStart.subscribe(
() => {
this.logger.debug('You have gone idle. Idle time period started');
});
this.idle.onTimeoutWarning.subscribe((countdown: any) => {
this.logger.warn('timed out warning dialog - ' + countdown);
});
// sets the ping interval to 15 seconds
this.keepalive.interval(15);
this.keepalive.onPing.subscribe(() =>
log("KeepAlive call"));
this.idle.setTimeout(idleTimeout);
const timeOutInterval = this.idle.getTimeout();
this.idle.watch();
Expected behavior
The onIdleStart event should raised based on setIdle configuration.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
OS10
@ng-idle version: 2.x
2.0.0-beta.12
Angular version: 2.x
Angular -4
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 ]
All browser
I'm submitting a ... (check one with "x")
Current behavior If we set the setIdle to whatever seconds. It doesn't raise onIdleStart event as per configured time. This happens normally if we set the timeInterval more than 5 seconds.
this.idle.setIdle(30);
It has been observed from console logs that the last value calculation is wrong. last value from LocalStorageExpiry.last() is coming wrong. Below is the sample code -
this.idle.setIdle(30);
const idleTimeout: number = parseInt(10); // sets a timeout period of 5 seconds. after 10 seconds of inactivity, the user will be considered timed out. // sets the default interrupts, in this case, things like clicks, scrolls, touches to the document this.idle.setInterrupts(DEFAULT_INTERRUPTSOURCES);
Expected behavior The onIdleStart event should raised based on setIdle configuration.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Please tell us about your environment: OS10
@ng-idle version: 2.x 2.0.0-beta.12
Angular version: 2.x Angular -4
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 ] All browser
Language: [all | TypeScript X.X | ES6/7 | ES5] Typescript
Node:
node --version
=