Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Commit

Permalink
fix(Routes): default routes when logged in or out
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjors committed Feb 5, 2016
1 parent 712440b commit c790890
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions assets/js/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ AppRouter.$inject = ['$stateProvider', '$urlRouterProvider'];

function AppRouter($stateProvider, $urlRouterProvider) {

$urlRouterProvider.otherwise('/');

$urlRouterProvider.otherwise(function ($injector, $location) {
let Wallet = $injector.get('Wallet');
return Wallet.status.isLoggedIn ? '/home' : '/login';
return Wallet.status.isLoggedIn ? '/home' : '/';
});

$urlRouterProvider.when('/settings', '/settings/wallet');
Expand Down

0 comments on commit c790890

Please sign in to comment.