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'); |   $urlRouterProvider.otherwise('/splash-page'); | ||||||
| 
 | 
 | ||||||
|   $stateProvider |   $stateProvider | ||||||
|   .state('splash-page', { |  | ||||||
|     data: { 'requiresLogin': false }, |  | ||||||
|     params: { |  | ||||||
|       // 'toState': 'launchpad-home',
 |  | ||||||
|       'toParams': { |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     url: '/splash-page', |  | ||||||
|     templateUrl: '/templates/splash-page.html', |  | ||||||
|   }) |  | ||||||
|   .state('app',{ |   .state('app',{ | ||||||
|     data: { 'requiresLogin': true }, |     data: { 'requiresLogin': true }, | ||||||
|     url: '/launchpad-', |     url: '/', | ||||||
|     views: { |     views: { | ||||||
|       'header': { |       'header': { | ||||||
|         templateUrl: '/templates/partials/header.html', |         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', { |   .state('app.home', { | ||||||
|     url: 'home', |     url: 'home', | ||||||
|     views: { |     views: { | ||||||
|  | |||||||
| @ -8,9 +8,9 @@ app.factory('Auth', ['localStorageService', '$location', function(localStorageSe | |||||||
|       // console.log("%c" + redirectedURL, "color: red; font-size: 72px;");
 |       // console.log("%c" + redirectedURL, "color: red; font-size: 72px;");
 | ||||||
| 
 | 
 | ||||||
|       if (redirectedURL === '/splash-page') { |       if (redirectedURL === '/splash-page') { | ||||||
|         $location.path('/launchpad-home'); |         $location.path('/home'); | ||||||
|       } else { |       } else { | ||||||
|         $location.path('/launchpad-' + redirectedURL); |         $location.path('/' + redirectedURL); | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     isLoggedIn: function(){ |     isLoggedIn: function(){ | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ | |||||||
|     <h4 class="text-center">Advanced Features Ahead</h4><br> |     <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> |     <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"> |     <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> |       <a>I don't care, let me through</a> | ||||||
|     </div> |     </div> | ||||||
|   </div> |   </div> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user