Coder Social home page Coder Social logo

Comments (5)

rgoj avatar rgoj commented on July 2, 2024 1

Adding this.idle.stop() to ngOnDestroy() worked for me (adding the unsubscribe didn't change anything), here's the original Plunker working fine after the addition of this.idle.stop():

https://plnkr.co/edit/WMHW9HJQq2CzYut0qXKo?p=preview

from ng2-idle.

guilhermejcgois avatar guilhermejcgois commented on July 2, 2024

We have a similar problem here, some updates about that @santanu-biswas ? Did you solve it? How?

from ng2-idle.

vincent-cm avatar vincent-cm commented on July 2, 2024

Try following, this worked for me:

this.subscriptionOnIdleStart = this.idle.onIdleStart.subscribe(() => {
this.idleState = 'You've gone idle!';
Logger.log('onIdleStart')
});

ngOnDestroy(): any {
this.subscriptionOnIdleStart.unsubscribe();
}

from ng2-idle.

vd-nagarro avatar vd-nagarro commented on July 2, 2024

Still getting the same error ,, on next screen or route change,, the interrupts events are not working, didn't get any interrupt even if trying to call this.idle.setInterrupts(DEFAULT_INTERRUPTSOURCES); and this cause idle to start subscribing and showing . Please comment @hackedbychinese @rgoj @vincent-cm

from ng2-idle.

PappuSharma231092 avatar PappuSharma231092 commented on July 2, 2024

I had also faced the same issue when I was implementing it on my project,
to resolve it, I removed "this.idle.watch();" from reset() function and place it below idle.setInterrupts(DEFAULT_INTERRUPTSOURCES); inside constructor.

from ng2-idle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.