grbsk / ng-idle

Responding to idle users in AngularJS applications.
http://hackedbychinese.github.io/ng-idle
MIT License
564 stars 195 forks source link

Angular 5 - generic component child used in several main component not working #214

Open XavierDeLapeyre opened 6 years ago

XavierDeLapeyre commented 6 years ago

Hi all I am new to Angular ( working on Angular 5 )

I found this great module and it fits my needs. I manage to make it work fine if I place the code in my main component Ex : App - component home App - component login App - component password

but it is kind of tedious and from what the team is planning there will be lots of main components.

So I thought of adding a child component ( like footer/header etc ) and created an idle child component that I placed on all my templates.

My issue is that it triggers on the first page load, but once I start navigating to other routes, the component does not trigger itself or does not reset itself. Tough for me to say for sure.

Is there a way to create an idle component that I could reuse in all my other main components?