moribvndvs / ng2-idle

Responding to idle users in Angular (not AngularJS) applications.
https://moribvndvs.github.io/ng2-idle
Apache License 2.0
315 stars 128 forks source link

@ngIdle not working if we refresh the page manually if am at localhost:8000/home and my @ngIdle logic on localhost:8000/login . #52

Open ashwinirajput opened 7 years ago

ashwinirajput commented 7 years ago

I'm submitting a ... (check one with "x")

[ ] 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

Expected behavior

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

adamjohnston151 commented 7 years ago

Just for clarification, are you saying your ngIdle does not fire if you are on a different page than the page that contains your logic?

vd-nagarro commented 6 years ago

I am also facing this issue .. when navigating to other page it is not calling the interrupts for that even though i have setting DEFAULT_INTERRUPTSOURCES again but it is not working. Please comment @HackedByChinese @adamjohnston151 @gitter-badger @HackedByChinese

moribvndvs commented 6 years ago

@vd-nagarro it's really hard to comment on this issue without minimal code to reproduce.

One issue that occurs regularly is that people add the idle code to a specific view, when it needs to happen globally for the application. In other words, they put it in a view or component, and when the user navigates away from the view or component, the idle detection goes away.

vd-nagarro commented 6 years ago

@HackedByChinese - Is there any way to let the idle detection remains the same across the whole application as i am using this in our app component which i think make it available through the application and the idle detection interrupts should work properly there too. .. i have use this inside the app.component on its ngOnInit() .. Is i am doing it right?