Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Trouble disabling ng-idle #194

Open
catiamatos1991 opened this issue May 22, 2017 · 1 comment
Open

Trouble disabling ng-idle #194

catiamatos1991 opened this issue May 22, 2017 · 1 comment

Comments

@catiamatos1991
Copy link

I'm trying to disable ng idle doing

app.config(['IdleProvider', function(IdleProvider) {
IdleProvider.keepalive(false);
IdleProvider.timeout(false);

    }]);

    // assume myApp was defined according to the "Configure" example above
    app.run(['Idle', function(Idle) {
        Idle.unwatch();
    }]);

But this isnt wprking.. Is there a way to do this?

@grbsk
Copy link
Owner

grbsk commented May 24, 2017

I think I'm missing some piece of information. config and run are only executed once, when your application starts. So here you've effectively told it to turn off keepalive and timeout, and when it runs, you tell it to stop watching even though you never told it to start watching. Ng-Idle does not automatically start by default, so I'm not sure what the problem you're experiencing is.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants