fixing routes

This commit is contained in:
Jon Lambson 2017-08-11 15:37:06 -06:00
parent ac7e30a111
commit 8b91bd4d69
3 changed files with 14 additions and 14 deletions

View File

@ -7,19 +7,9 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider
$urlRouterProvider.otherwise('/splash-page');
$stateProvider
.state('splash-page', {
data: { 'requiresLogin': false },
params: {
// 'toState': 'launchpad-home',
'toParams': {
}
},
url: '/splash-page',
templateUrl: '/templates/splash-page.html',
})
.state('app',{
data: { 'requiresLogin': true },
url: '/launchpad-',
url: '/',
views: {
'header': {
templateUrl: '/templates/partials/header.html',
@ -34,6 +24,16 @@ app.config(['$stateProvider', '$urlRouterProvider', 'localStorageServiceProvider
}
}
})
.state('splash-page', {
data: { 'requiresLogin': false },
params: {
// 'toState': 'home',
'toParams': {
}
},
url: '/splash-page',
templateUrl: '/templates/splash-page.html',
})
.state('app.home', {
url: 'home',
views: {

View File

@ -8,9 +8,9 @@ app.factory('Auth', ['localStorageService', '$location', function(localStorageSe
// console.log("%c" + redirectedURL, "color: red; font-size: 72px;");
if (redirectedURL === '/splash-page') {
$location.path('/launchpad-home');
$location.path('/home');
} else {
$location.path('/launchpad-' + redirectedURL);
$location.path('/' + redirectedURL);
}
},
isLoggedIn: function(){

View File

@ -4,7 +4,7 @@
<h4 class="text-center">Advanced Features Ahead</h4><br>
<p class="text-center">This space is intended for<br> people that need more functionality<br> than the average bear</p><br>
<div class="text-center">
<a ng-href="/#!/launchpad-home" class="btn btn-default">I'd like to go home, please</a><br><br>
<a ng-href="/#!/home" class="btn btn-default">I'd like to go home, please</a><br><br>
<a>I don't care, let me through</a>
</div>
</div>