fixing routes
This commit is contained in:
parent
ac7e30a111
commit
8b91bd4d69
22
js/app.js
22
js/app.js
|
@ -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: {
|
||||
|
|
|
@ -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(){
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue