mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
49 lines
1.4 KiB
TypeScript
49 lines
1.4 KiB
TypeScript
import { NgModule } from '@angular/core'
|
|
import { PreloadAllModules, RouterModule, Routes } from '@angular/router'
|
|
import { NavGuard } from './guards/nav-guard'
|
|
|
|
const routes: Routes = [
|
|
{ path: '', redirectTo: '/product-key', pathMatch: 'full' },
|
|
{
|
|
path: 'init',
|
|
loadChildren: () => import('./pages/init/init.module').then( m => m.InitPageModule),
|
|
canActivate: [NavGuard],
|
|
},
|
|
{
|
|
path: 'product-key',
|
|
loadChildren: () => import('./pages/product-key/product-key.module').then( m => m.ProductKeyPageModule),
|
|
},
|
|
{
|
|
path: 'home',
|
|
loadChildren: () => import('./pages/home/home.module').then( m => m.HomePageModule),
|
|
canActivate: [NavGuard],
|
|
},
|
|
{
|
|
path: 'recover',
|
|
loadChildren: () => import('./pages/recover/recover.module').then( m => m.RecoverPageModule),
|
|
canActivate: [NavGuard],
|
|
},
|
|
{
|
|
path: 'embassy',
|
|
loadChildren: () => import('./pages/embassy/embassy.module').then( m => m.EmbassyPageModule),
|
|
canActivate: [NavGuard],
|
|
},
|
|
{
|
|
path: 'loading',
|
|
loadChildren: () => import('./pages/loading/loading.module').then( m => m.LoadingPageModule),
|
|
canActivate: [NavGuard],
|
|
},
|
|
]
|
|
|
|
@NgModule({
|
|
imports: [
|
|
RouterModule.forRoot(routes, {
|
|
scrollPositionRestoration: 'enabled',
|
|
preloadingStrategy: PreloadAllModules,
|
|
useHash: true,
|
|
}),
|
|
],
|
|
exports: [RouterModule],
|
|
})
|
|
export class AppRoutingModule { }
|