ng-idle

Auto logout with Angularjs based on idle user

六月ゝ 毕业季﹏ 提交于 2019-11-26 11:50:33
问题 Is it possible to determine if a user is inactive and automatically log them out after say 10 minutes of inactivity using angularjs? I was trying to avoid using jQuery, but I cannot find any tutorials or articles on how to do this in angularjs. Any help would be appreciated. 回答1: I wrote a module called Ng-Idle that may be useful to you in this situation. Here is the page which contains instructions and a demo. Basically, it has a service that starts a timer for your idle duration that can be