Skip to content

Commit

Permalink
Use configure() in state
Browse files Browse the repository at this point in the history
  • Loading branch information
LFDM committed May 27, 2014
1 parent bee5405 commit 95f5322
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/js/arethusa.core/state.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

angular.module('arethusa.core').service('state', function(configurator, navigator, $rootScope) {
var self = this;
var tokenRetrievers;

var conf = configurator.configurationFor('main');
var tokenRetrievers = configurator.getRetrievers(conf.retrievers);
function configure() {
var conf = configurator.configurationFor('main');
tokenRetrievers = configurator.getRetrievers(conf.retrievers);
}

// We hold tokens locally during retrieval phase.
// Once we are done, they will be exposed through
Expand Down Expand Up @@ -260,6 +263,7 @@ angular.module('arethusa.core').service('state', function(configurator, navigato
};

this.init = function() {
this.retrieveTokens();
configure();
self.retrieveTokens();
};
});

0 comments on commit 95f5322

Please sign in to comment.