mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
* feat: move all frontend projects under the same Angular workspace * Refactor/angular workspace (#1154) * update frontend build steps Co-authored-by: waterplea <alexander@inkin.ru> Co-authored-by: Matt Hill <matthewonthemoon@gmail.com> Co-authored-by: Lucy Cifferello <12953208+elvece@users.noreply.github.com>
50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
import { NgModule } from '@angular/core'
|
|
import { PreloadAllModules, RouterModule, Routes } from '@angular/router'
|
|
import { NavGuard, RecoveryNavGuard } 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: [RecoveryNavGuard],
|
|
},
|
|
{
|
|
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,
|
|
initialNavigation: 'disabled',
|
|
}),
|
|
],
|
|
exports: [RouterModule],
|
|
})
|
|
export class AppRoutingModule { }
|