Linc Abela Linc Abela - 8 months ago 44
Javascript Question

AngularJS: Track the time spent in the web app then trigger an event on specific time

I want to track the time the user use the website and then I need to raise an event when the user have been on the site for 30 seconds. Any idea on how to do this?


Why not use Angular's built in $timeout

$timeout(function raiseEvent(){
   //do something here
}, 30000)