Hi, my application uses the IdleProvider to logout the user.
At the moment it is setup like this:
myApp.config(['KeepaliveProvider', 'IdleProvider',
function (KeepaliveProvider, IdleProvider) {
// Logout configuration
IdleProvider.idle(20);
IdleProvider.timeout(10);
KeepaliveProvider.interval(3);
}]);
Now I would like to change the idle value (20) from within a controller.
THe controller looks like this:
myApp.controller("mainController", function ($scope, $http, $location,
authUrl, AuthFactory, $rootScope,
Idle, $state, ConfigFactory) {
But when I just add the IdleProvider to the functions parameters, I get
a problem with the dependency injection.
Unknown prodiver: IdleProviderProvider <- IdleProvider <- mainController
myApp.controller("mainController", ["IdleProvider", "Idle", function ($scope,
$http, $location,
authUrl, AuthFactory, $rootScope,
IdleProvider,
Idle, $state, ConfigFactory) {
It turns out, that doing a
myApp.controller("mainController", ["IdleProvider", function ($scope, $http,
$location,
authUrl, AuthFactory, $rootScope,
IdleProvider,
Idle, $state, ConfigFactory) {
works out for the IdleProvider but lets me fail with calls like
$rootScope.$on
Any light shed on this would be highly appreciated.
Kind regards
Cornelius
--
Cornelius Kölbel
[email protected]
+49 151 2960 1417
NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798
Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: OpenPGP digital signature
