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

Setting timeout with variable data #200

Open
alexandroscgb opened this issue Jun 30, 2017 · 2 comments
Open

Setting timeout with variable data #200

alexandroscgb opened this issue Jun 30, 2017 · 2 comments

Comments

@alexandroscgb
Copy link

Hi.
I'm trying to set the timeout with a value that should come from a function in $scope, but in that momento of the app loading, nothing like $scope of anything else exists yet.
How could I do this? Is it even possible?

Thanks.

@adamfollett
Copy link

Having the exact same issue. I need to pull the idle and timeout data from an external service depending on the client logged in. Any help on this would be great!

@mberrang
Copy link

@alexandroscgb @adamfollett - Correct, you can't do this on config while angular is bootstrapping itself (you can only manually set the values in config and only providers can be injected into a configuration block)

However, after initial config, you should be able to use setTimeout() or setIdle() on the Idle service. You should be able to do that in any service, controller, or factory (e.g., immediately on/after login) that needs access to $scope (I would recommend a service).

See: #206 (comment)

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

3 participants