Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have implemented Session timeout using AngularJS
Below is code:

var user = angular.module('user', ['ui.bootstrap', 'xeditable', 'ngIdle']);

user.config(function($httpProvider, $keepaliveProvider, $idleProvider) {
    $httpProvider.defaults.timeout = 10000;
    $idleProvider.idleDuration(5*1); // seconds
    $idleProvider.warningDuration(3); // seconds
    $idleProvider.autoResume(true); // true/false
    $keepaliveProvider.interval(10); // seconds
});  

This works for Dashboard page.
I have used same module for signup page but with a different controller.

user.controller('signup', function(){
   //Code here
}

But for signup page, idle duration and warning duration have to be removed. I tried changing from controller, but it did not work.

Is there any way I can change value of module from a controller?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.