You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug ERROR TypeError: this.expiry.last is not a function
at Idle.push../node_modules/@ng-idle/core/fesm5/ng-idle-core.js.Idle.watch (ng-idle-core.js:1221)
import{Injectable}from'@angular/core';import{Idle,DEFAULT_INTERRUPTSOURCES}from'@ng-idle/core';
@Injectable({providedIn: 'root'})exportclassIdleService{publicidleState='Not started.';constructor(privateidle: Idle){}publicstart(): void{this.idle.setIdle(5);// sets a timeout period of 5 seconds. after 10 seconds of inactivity, the user will be considered timed out.// this.idle.setTimeout(5);// sets the default interrupts, in this case, things like clicks, scrolls, touches to the documentthis.idle.setInterrupts(DEFAULT_INTERRUPTSOURCES);this.idle.onIdleStart.subscribe(()=>{this.idleState='You\'ve gone idle!';console.log(this.idleState);});this.idle.onTimeoutWarning.subscribe(countdown=>{this.idleState='You will time out in '+countdown+' seconds!';console.log(this.idleState);});this.idle.watch();this.idleState='Started.';}}
Expected behavior
A timer starts that will reset upon user activity.
Please tell us about your environment
Mobile or Desktop: Desktop
Browser: Chrome
Version: 76.0.3809.132 (Official Build) (64-bit)
Angular version: 8.2.2
NodeJS version: 8.12.0
Language (TypeScript x.x, ES5, ES2015, etc.): TypeScript
Additional context
I followed the example as closely as I could to import the module into the project.
The text was updated successfully, but these errors were encountered:
Describe the bug
ERROR TypeError: this.expiry.last is not a function
at Idle.push../node_modules/@ng-idle/core/fesm5/ng-idle-core.js.Idle.watch (ng-idle-core.js:1221)
To Reproduce
app.module.ts
app.component.ts
idle.service.ts
Expected behavior
A timer starts that will reset upon user activity.
Please tell us about your environment
Additional context
I followed the example as closely as I could to import the module into the project.
The text was updated successfully, but these errors were encountered: