Promise-ify the call to /config and reduce number

of calls to 1 per session. We'll also pull the config/license info from memory instead of local storage
This commit is contained in:
Jared Tabor
2016-05-16 09:24:49 -04:00
parent 05b3920837
commit 8b271c4caf
15 changed files with 388 additions and 100 deletions

View File

@@ -11,10 +11,17 @@ export default function($stateProvider) {
resolve.features = ['FeaturesService', function(FeaturesService) {
return FeaturesService.get();
}];
// resolve.features = ['CheckLicense', 'Store', '$state',
// function(CheckLicense, Store, $state) {
// var license = Store('license');
// if(CheckLicense.valid(license)=== false){
// $state.go('license');
// }
// }];
return resolve;
}
},
addState: function(state) {
var route = state.route || state.url,
resolve = this.getResolves(state);