modev wallet validation from all controllers to router
This commit is contained in:
parent
5ef607201b
commit
e5a4e3c25c
9 changed files with 17 additions and 37 deletions
|
|
@ -45,4 +45,12 @@ angular
|
|||
$locationProvider
|
||||
.html5Mode(false);
|
||||
//.hashPrefix('!');
|
||||
})
|
||||
.run(function($rootScope, $location) {
|
||||
$rootScope.$on('$routeChangeStart', function() {
|
||||
if (!$rootScope.wallet || !$rootScope.wallet.id) {
|
||||
console.log('############ no wallet');
|
||||
$location.path('signin');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue