nico-val / ngIdleTimer

AngularJS Module to execute a function when no there's no user interaction after a predefined lapse.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ngIdleTimer

AngularJS Module to execute a function when no there's no user interaction after a predefined lapse.

##Installation

  1. Download latest release from here

  2. Include ngIdleTimer.js in your HTML.

    <script src="ngIdleTimer.js"></script>
  3. Inject the module in your app.

    angular.module('myApp',['ngIdleTimer']);

##Usage

  1. Inject ngIdleTimer in your controller

    angular.controller('myController',['ngIdleTimer',function(ngIdleTimer){
      /* ... */
    }]);
  2. Set your Idle Timer using

    ngIdleTimer.onIdleTimeOut(function, numSeconds);

    function is, of course, the function you wan't to be executed when no user interaction is detected after numSeconds seconds

About

AngularJS Module to execute a function when no there's no user interaction after a predefined lapse.

License:GNU General Public License v2.0


Languages

Language:JavaScript 100.0%