grbsk / ng-idle

Responding to idle users in AngularJS applications.
http://hackedbychinese.github.io/ng-idle
MIT License
564 stars 195 forks source link

Set idle and timeout time dynamically in angularjs #206

Closed chetanganguly closed 7 years ago

chetanganguly commented 7 years ago

Hey guys..I want to set idel and timeout ..time dynamically myApp.config(['KeepaliveProvider', 'IdleProvider', function(KeepaliveProvider, IdleProvider) { IdleProvider.idle(5); IdleProvider.timeout(5); KeepaliveProvider.interval(10); }]); Time in seconds come from db as client required Using web API How can I perform that? Any idea please share

grbsk commented 7 years ago

At any time (post config) you can call Idle.setTimeout() or Idle.setIdle() to change those values.

chetanganguly commented 7 years ago

Thanks it worked