Browse Source

fixing routes

master
Jon Lambson 7 years ago
parent
commit
8b91bd4d69
  1. 22
      js/app.js
  2. 4
      js/services/auth.js
  3. 2
      templates/dns.html

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: {

4
js/services/auth.js

@ -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(){

2
templates/dns.html

@ -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…
Cancel
Save