Files
micro-frontend/ng-ttc-frontend/src/app/controls/main-control/main-control-routing.module.ts

42 lines
1.7 KiB
TypeScript
Raw Normal View History

import { MainManagerContentComponent } from './../../content/main-manager-content/main-manager-content.component';
2025-11-17 17:19:18 +07:00
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { MainDashboardContentComponent } from '../../content/main-dashboard-content/main-dashboard-content.component';
import { MainReportComponent } from '../../component/main-report/main-report.component';
import { BudgetAproval } from '../../component/budget-aproval/budget-aproval';
import { MainLandingComponent } from '../../component/main-landing/main-landing.component';
2025-11-17 17:19:18 +07:00
// import { MainReportComponent } from '../../component/main-report/main-report.component';
const routes: Routes = [
2025-11-19 18:30:35 +07:00
{ path: 'landing', component: MainLandingComponent },
2025-11-17 17:19:18 +07:00
{ path: 'dashboard', component: MainDashboardContentComponent },
{ path: 'report', component: MainReportComponent },
{ path: 'manager', component: MainManagerContentComponent },
{
path: 'manager',
children: [
{ path: '', component: MainManagerContentComponent }, // รายการโครงการ
{ path: 'budget/:code', component: BudgetAproval }, // จัดการงบประมาณ
]
},
2025-11-17 17:19:18 +07:00
// children: [
// {
// path: 'dashboard',
// // loadChildren: () => import('./controls/profile-control/profile-control.module').then(m => m.ProfileControlModule)
// },
// { path: 'report', component: MainReportComponent },
// { path: '', redirectTo: 'profile', pathMatch: 'full' }
// ]
{ path: '', redirectTo: 'landing', pathMatch: 'full' },
{ path: '**', redirectTo: 'landing' }
2025-11-17 17:19:18 +07:00
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class MainControlRoutingModule { }