Angular, Technology, Programming, JavaScript, Front End Development.
constructor(private authService: AuthService) {} ngOnInit(): void { // Listen for user activity fromEvent(document, 'mousemove').pipe( debounceTime(1000) // Adjust debounce time as needed ).subscribe(() => { // User is active, reset session timer this.authService.startSessionTimer(); }); } } Step