Implementing Session Timeout service for Ionic/Angular, with Timer Reset with each new user interaction
问题 I'm trying to adapt some code I've created for a session timeout. Whenever a user interacts with the function, I want to reset the timer to start counting down again. I'm having difficulty working out how to inject similar code to this example C# code - I'm trying to integrate: var update = new Subject<bool>(); var res = update .Select(x => Observable.Interval(TimeSpan.FromSeconds(10.0))) .Switch(); res .Subscribe(_ => Console.WriteLine("Status sent.")); update.OnNext(true); res .Subscribe(_