ng2-idle

ngIdle - How to clear and reset interrupts in Angular

℡╲_俬逩灬. 提交于 2019-12-31 05:37:25
问题 I have integrated ngidle library in my app and i am showing dialog with timeout value . I would like to stop the timer value only on interactions on the dialog . not on the screen so on nginit i have set the default interrrupts and on timeout warning i am clearing the interrupts but i am not able to reset the interrupts . The sample code is below , Please check and let me know if anything goes wrong . ngOnInit() { // sets the default interrupts, in this case, things like clicks, scrolls,

ngIdle - How to clear and reset interrupts in Angular

这一生的挚爱 提交于 2019-12-02 11:34:24
I have integrated ngidle library in my app and i am showing dialog with timeout value . I would like to stop the timer value only on interactions on the dialog . not on the screen so on nginit i have set the default interrrupts and on timeout warning i am clearing the interrupts but i am not able to reset the interrupts . The sample code is below , Please check and let me know if anything goes wrong . ngOnInit() { // sets the default interrupts, in this case, things like clicks, scrolls, touches to the document this.idle.setInterrupts(DEFAULT_INTERRUPTSOURCES); } this.idle.onTimeoutWarning