Thank you in advance for your response. I am facing an issue with monitoring user activity and automatically logging them out after a certain period of inactivity. I have successfully implemented this feature in my app.component.ts file, however, it only seems to work once. Once the app logs the user out, the ngOnInit function of app.component is not triggered again. I am searching for a way to reload the page upon login so that the ngOnInit function in app.component.ts can start monitoring the entire application again.
I attempted using window.location.reload(), but when I placed it in the OnInit function of my home component, the page kept reloading continuously. Is there a way to reload the window just once?
Below is my app.component code:
// Paste the provided code here