mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
redirect to prod key
This commit is contained in:
committed by
Aiden McClelland
parent
ffd8f7b278
commit
21a0ee7fad
@@ -3,6 +3,7 @@ import { PreloadAllModules, RouterModule, Routes } from '@angular/router'
|
|||||||
import { NavGuard } from './guards/nav-guard'
|
import { NavGuard } from './guards/nav-guard'
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
|
{ path: '', redirectTo: '/product-key', pathMatch: 'full' },
|
||||||
{
|
{
|
||||||
path: 'init',
|
path: 'init',
|
||||||
loadChildren: () => import('./pages/init/init.module').then( m => m.InitPageModule),
|
loadChildren: () => import('./pages/init/init.module').then( m => m.InitPageModule),
|
||||||
|
|||||||
@@ -13,8 +13,12 @@ export class NavGuard implements CanActivate {
|
|||||||
|
|
||||||
canActivate (): boolean {
|
canActivate (): boolean {
|
||||||
if (this.httpService.productKey) {
|
if (this.httpService.productKey) {
|
||||||
|
console.log('here here here')
|
||||||
|
console.log('here here here')
|
||||||
|
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
|
console.log('here here here')
|
||||||
this.router.navigateByUrl('product-key')
|
this.router.navigateByUrl('product-key')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,4 @@ import { SuccessPageRoutingModule } from './success-routing.module'
|
|||||||
],
|
],
|
||||||
declarations: [SuccessPage],
|
declarations: [SuccessPage],
|
||||||
})
|
})
|
||||||
export class SuccessPageModule {
|
export class SuccessPageModule { }
|
||||||
constructor () {
|
|
||||||
console.log('SuccessModule loaded.')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user