Files
cbsnexora/src/app/home/home-routing.module.ts
T

58 lines
1.4 KiB
TypeScript

/**
* Copyright since 2025 Mifos Initiative
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/** Angular Imports */
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
/** Routing Imports */
import { Route } from '../core/route/route.service';
/** Custom Components */
import { HomeComponent } from './home.component';
import { DashboardComponent } from './dashboard/dashboard.component';
/** Custom Resolvers */
import { OfficesResolver } from '../accounting/common-resolvers/offices.resolver';
/** Home and Dashboard Routes */
const routes: Routes = [
Route.withShell([
{
path: '',
redirectTo: '/home',
pathMatch: 'full'
},
{
path: 'home',
component: HomeComponent,
data: { title: 'Home' }
},
{
path: 'dashboard',
component: DashboardComponent,
data: { title: 'Dashboard', breadcrumb: 'Dashboard' },
resolve: {
offices: OfficesResolver
}
}
])
];
/**
* Home Routing Module
*
* Configures the home and dashboard routes.
*/
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
providers: [OfficesResolver]
})
export class HomeRoutingModule {}