Files
micro-frontend/ng-ttc-frontend/src/app/app-routing.module.ts
x2Skyz 15308ababa
All checks were successful
Build Docker Image / Preparing Dependecies (push) Successful in 4s
-login guard
-caching
-budget
2025-11-19 18:30:35 +07:00

50 lines
1.4 KiB
TypeScript

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { SidebarContentComponent } from './content/sidebar-content/sidebar-content.component';
import { LicensePrivacyTermsComponent } from './component/license-privacy-terms/license-privacy-terms.component';
import { authGuard } from './services/auth.guard';
import { loginGuard } from './services/login.guard';
const routes: Routes = [
{ path: 'login', loadChildren: () => import('./controls/login-control/login-control.module').then(m => m.LoginControlModule), canActivate: [loginGuard] },
{ path: 'license', component: LicensePrivacyTermsComponent},
{
path: 'main',
component: SidebarContentComponent,
canActivate: [
authGuard
],
children: [
{
path: '',
loadChildren: () =>
import('./controls/main-control/main-control.module').then(
(m) => m.MainControlModule
),
},
// {
// path: 'report',
// loadChildren: () =>
// import('./controls/report-control/report-control.module').then(
// (m) => m.ReportControlModule
// ),
// },
],
},
// {path: 'license' , component: LicensePrivacyTermsComponent}
{ path: '', redirectTo: 'login', pathMatch: 'full' },
{ path: '**', redirectTo: 'login' }
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule {}